Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 20:53:56 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions
+497
View File
@@ -0,0 +1,497 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ActionCatalog(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ActionCatalog, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(ActionCatalog, super::super::super::Foundation::IClosable);
impl ActionCatalog {
pub fn GetAllActions(&self) -> windows_core::Result<windows_core::Array<ActionDefinition>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetAllActions)(windows_core::Interface::as_raw(this), windows_core::Array::<ActionDefinition>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn Changed<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<ActionCatalog, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Changed)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetActionsForInputs(&self, inputentities: &[Option<super::ActionEntity>]) -> windows_core::Result<windows_core::Array<ActionInstance>> {
let this = &windows_core::Interface::cast::<IActionCatalog2>(self)?;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetActionsForInputs)(windows_core::Interface::as_raw(this), inputentities.len().try_into().unwrap(), core::mem::transmute(inputentities.as_ptr()), windows_core::Array::<ActionInstance>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
#[cfg(feature = "UI")]
pub fn GetActionsForInputs2(&self, inputentities: &[Option<super::ActionEntity>], invokerwindowid: super::super::super::UI::WindowId) -> windows_core::Result<windows_core::Array<ActionInstance>> {
let this = &windows_core::Interface::cast::<IActionCatalog2>(self)?;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetActionsForInputs2)(windows_core::Interface::as_raw(this), inputentities.len().try_into().unwrap(), core::mem::transmute(inputentities.as_ptr()), invokerwindowid, windows_core::Array::<ActionInstance>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn GetActionsForCurrentApp(&self) -> windows_core::Result<windows_core::Array<ActionDefinition>> {
let this = &windows_core::Interface::cast::<IActionCatalog3>(self)?;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetActionsForCurrentApp)(windows_core::Interface::as_raw(this), windows_core::Array::<ActionDefinition>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for ActionCatalog {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IActionCatalog>();
}
unsafe impl windows_core::Interface for ActionCatalog {
type Vtable = <IActionCatalog as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IActionCatalog as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ActionCatalog {
const NAME: &'static str = "Windows.AI.Actions.Hosting.ActionCatalog";
}
unsafe impl Send for ActionCatalog {}
unsafe impl Sync for ActionCatalog {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ActionDefinition(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ActionDefinition, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(ActionDefinition, super::super::super::Foundation::IClosable);
impl ActionDefinition {
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn IconFullPath(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IconFullPath)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn PackageFamilyName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageFamilyName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetInputs(&self) -> windows_core::Result<windows_core::Array<ActionEntityRegistrationInfo>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetInputs)(windows_core::Interface::as_raw(this), windows_core::Array::<ActionEntityRegistrationInfo>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn GetOutputs(&self) -> windows_core::Result<windows_core::Array<ActionEntityRegistrationInfo>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetOutputs)(windows_core::Interface::as_raw(this), windows_core::Array::<ActionEntityRegistrationInfo>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn GetOverloads(&self) -> windows_core::Result<windows_core::Array<ActionOverload>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetOverloads)(windows_core::Interface::as_raw(this), windows_core::Array::<ActionOverload>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn DisplaysUI(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IActionDefinition2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplaysUI)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn UsesGenerativeAI(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IActionDefinition2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UsesGenerativeAI)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SchemaVersion(&self) -> windows_core::Result<u32> {
let this = &windows_core::Interface::cast::<IActionDefinition2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SchemaVersion)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PackageRelativeApplicationId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IActionDefinition3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageRelativeApplicationId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn IsCurrentlyAvailable(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IActionDefinition4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsCurrentlyAvailable)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for ActionDefinition {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IActionDefinition>();
}
unsafe impl windows_core::Interface for ActionDefinition {
type Vtable = <IActionDefinition as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IActionDefinition as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ActionDefinition {
const NAME: &'static str = "Windows.AI.Actions.Hosting.ActionDefinition";
}
unsafe impl Send for ActionDefinition {}
unsafe impl Sync for ActionDefinition {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ActionEntityRegistrationInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ActionEntityRegistrationInfo, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(ActionEntityRegistrationInfo, super::super::super::Foundation::IClosable);
impl ActionEntityRegistrationInfo {
pub fn Name(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Name)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn Kind(&self) -> windows_core::Result<super::ActionEntityKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Kind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetKind(&self, value: super::ActionEntityKind) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetKind)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for ActionEntityRegistrationInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IActionEntityRegistrationInfo>();
}
unsafe impl windows_core::Interface for ActionEntityRegistrationInfo {
type Vtable = <IActionEntityRegistrationInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IActionEntityRegistrationInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ActionEntityRegistrationInfo {
const NAME: &'static str = "Windows.AI.Actions.Hosting.ActionEntityRegistrationInfo";
}
unsafe impl Send for ActionEntityRegistrationInfo {}
unsafe impl Sync for ActionEntityRegistrationInfo {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ActionInstance(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ActionInstance, windows_core::IUnknown, windows_core::IInspectable);
impl ActionInstance {
pub fn DisplayInfo(&self) -> windows_core::Result<ActionInstanceDisplayInfo> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayInfo)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Definition(&self) -> windows_core::Result<ActionDefinition> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Definition)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Context(&self) -> windows_core::Result<super::ActionInvocationContext> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Context)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn InvokeAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InvokeAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ActionInstance {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IActionInstance>();
}
unsafe impl windows_core::Interface for ActionInstance {
type Vtable = <IActionInstance as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IActionInstance as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ActionInstance {
const NAME: &'static str = "Windows.AI.Actions.Hosting.ActionInstance";
}
unsafe impl Send for ActionInstance {}
unsafe impl Sync for ActionInstance {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ActionInstanceDisplayInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ActionInstanceDisplayInfo, windows_core::IUnknown, windows_core::IInspectable);
impl ActionInstanceDisplayInfo {
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for ActionInstanceDisplayInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IActionInstanceDisplayInfo>();
}
unsafe impl windows_core::Interface for ActionInstanceDisplayInfo {
type Vtable = <IActionInstanceDisplayInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IActionInstanceDisplayInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ActionInstanceDisplayInfo {
const NAME: &'static str = "Windows.AI.Actions.Hosting.ActionInstanceDisplayInfo";
}
unsafe impl Send for ActionInstanceDisplayInfo {}
unsafe impl Sync for ActionInstanceDisplayInfo {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ActionOverload(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ActionOverload, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(ActionOverload, super::super::super::Foundation::IClosable);
impl ActionOverload {
pub fn DescriptionTemplate(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DescriptionTemplate)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetInputs(&self) -> windows_core::Result<windows_core::Array<ActionEntityRegistrationInfo>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetInputs)(windows_core::Interface::as_raw(this), windows_core::Array::<ActionEntityRegistrationInfo>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn InvokeAsync<P0>(&self, context: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::ActionInvocationContext>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(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__))
}
}
pub fn InvokeFeedbackAsync<P0, P1>(&self, context: P0, feedback: P1) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::ActionInvocationContext>,
P1: windows_core::Param<super::ActionFeedback>,
{
let this = &windows_core::Interface::cast::<IActionOverload2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InvokeFeedbackAsync)(windows_core::Interface::as_raw(this), context.param().abi(), feedback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetSupportsFeedback(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IActionOverload2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetSupportsFeedback)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for ActionOverload {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IActionOverload>();
}
unsafe impl windows_core::Interface for ActionOverload {
type Vtable = <IActionOverload as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IActionOverload as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ActionOverload {
const NAME: &'static str = "Windows.AI.Actions.Hosting.ActionOverload";
}
unsafe impl Send for ActionOverload {}
unsafe impl Sync for ActionOverload {}
windows_core::imp::define_interface!(IActionCatalog, IActionCatalog_Vtbl, 0xdbe7c537_66ea_5394_9085_4fc19d78375c);
impl windows_core::RuntimeType for IActionCatalog {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionCatalog_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetAllActions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Changed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionCatalog2, IActionCatalog2_Vtbl, 0x370360b1_a14b_5ea8_b611_b5f70342ba44);
impl windows_core::RuntimeType for IActionCatalog2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionCatalog2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetActionsForInputs: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::ActionEntity, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "UI")]
pub GetActionsForInputs2: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::ActionEntity, super::super::super::UI::WindowId, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
GetActionsForInputs2: usize,
}
windows_core::imp::define_interface!(IActionCatalog3, IActionCatalog3_Vtbl, 0x2e05d518_8680_55d3_820d_2605adb7d62d);
impl windows_core::RuntimeType for IActionCatalog3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionCatalog3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetActionsForCurrentApp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionDefinition, IActionDefinition_Vtbl, 0xfe766add_924d_5231_855e_dac9e82c7e6c);
impl windows_core::RuntimeType for IActionDefinition {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionDefinition_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IconFullPath: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputs: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputs: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOverloads: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionDefinition2, IActionDefinition2_Vtbl, 0xc1f44733_f563_54e2_bd2b_dc4c732054cf);
impl windows_core::RuntimeType for IActionDefinition2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionDefinition2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DisplaysUI: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub UsesGenerativeAI: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SchemaVersion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionDefinition3, IActionDefinition3_Vtbl, 0x89c9a7e0_4bfd_55f4_9eed_dce2250114fa);
impl windows_core::RuntimeType for IActionDefinition3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionDefinition3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PackageRelativeApplicationId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionDefinition4, IActionDefinition4_Vtbl, 0x6dd91071_8847_55b6_9518_9ff8de421eb7);
impl windows_core::RuntimeType for IActionDefinition4 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionDefinition4_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsCurrentlyAvailable: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionEntityRegistrationInfo, IActionEntityRegistrationInfo_Vtbl, 0xc3b92bdb_03c3_5a9e_b049_002fa0405699);
impl windows_core::RuntimeType for IActionEntityRegistrationInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionEntityRegistrationInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Name: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Kind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ActionEntityKind) -> windows_core::HRESULT,
pub SetKind: unsafe extern "system" fn(*mut core::ffi::c_void, super::ActionEntityKind) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionInstance, IActionInstance_Vtbl, 0x809bcb6e_e6ef_5f16_b89a_06b8893df20e);
impl windows_core::RuntimeType for IActionInstance {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionInstance_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DisplayInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Definition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Context: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub InvokeAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionInstanceDisplayInfo, IActionInstanceDisplayInfo_Vtbl, 0xfcfdce21_678b_5602_b9dc_2f4533a6f4b2);
impl windows_core::RuntimeType for IActionInstanceDisplayInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionInstanceDisplayInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IActionOverload, IActionOverload_Vtbl, 0x5d184610_d09d_5375_9849_505c359dca01);
impl windows_core::RuntimeType for IActionOverload {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionOverload_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DescriptionTemplate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputs: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
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,
}
windows_core::imp::define_interface!(IActionOverload2, IActionOverload2_Vtbl, 0x57ec9906_8231_5a9e_929f_bf39e952eb93);
impl windows_core::RuntimeType for IActionOverload2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionOverload2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub InvokeFeedbackAsync: 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,
pub GetSupportsFeedback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
+104
View File
@@ -0,0 +1,104 @@
windows_core::imp::define_interface!(IActionFeedbackHandler, IActionFeedbackHandler_Vtbl, 0xa3fc3c51_a8c6_52c8_ad77_37bf3e2b565c);
impl windows_core::RuntimeType for IActionFeedbackHandler {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IActionFeedbackHandler, windows_core::IUnknown, windows_core::IInspectable);
impl IActionFeedbackHandler {
pub fn ProcessFeedbackAsync<P0, P1>(&self, context: P0, feedback: P1) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::ActionInvocationContext>,
P1: windows_core::Param<super::ActionFeedback>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(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__))
}
}
}
impl windows_core::RuntimeName for IActionFeedbackHandler {
const NAME: &'static str = "Windows.AI.Actions.Provider.IActionFeedbackHandler";
}
pub trait IActionFeedbackHandler_Impl: windows_core::IUnknownImpl {
fn ProcessFeedbackAsync(&self, context: windows_core::Ref<super::ActionInvocationContext>, feedback: windows_core::Ref<super::ActionFeedback>) -> windows_core::Result<windows_future::IAsyncAction>;
}
impl IActionFeedbackHandler_Vtbl {
pub const fn new<Identity: IActionFeedbackHandler_Impl, const OFFSET: isize>() -> Self {
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 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IActionFeedbackHandler_Impl::ProcessFeedbackAsync(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&feedback)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IActionFeedbackHandler, OFFSET>(),
ProcessFeedbackAsync: ProcessFeedbackAsync::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IActionFeedbackHandler as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionFeedbackHandler_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
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,
}
windows_core::imp::define_interface!(IActionProvider, IActionProvider_Vtbl, 0x62906c47_3d07_55f1_aefa_1522505afbbe);
impl windows_core::RuntimeType for IActionProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IActionProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IActionProvider {
pub fn InvokeAsync<P0>(&self, context: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::ActionInvocationContext>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(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__))
}
}
}
impl windows_core::RuntimeName for IActionProvider {
const NAME: &'static str = "Windows.AI.Actions.Provider.IActionProvider";
}
pub trait IActionProvider_Impl: windows_core::IUnknownImpl {
fn InvokeAsync(&self, context: windows_core::Ref<super::ActionInvocationContext>) -> windows_core::Result<windows_future::IAsyncAction>;
}
impl IActionProvider_Vtbl {
pub const fn new<Identity: IActionProvider_Impl, const OFFSET: isize>() -> Self {
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 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IActionProvider_Impl::InvokeAsync(this, core::mem::transmute_copy(&context)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IActionProvider, OFFSET>(), InvokeAsync: InvokeAsync::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IActionProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IActionProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
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,
}
File diff suppressed because it is too large Load Diff
+306
View File
@@ -0,0 +1,306 @@
windows_core::imp::define_interface!(IMcpHttpConnectionResult, IMcpHttpConnectionResult_Vtbl, 0xd2c3755f_6d3c_5e90_84dd_3e0973049606);
impl windows_core::RuntimeType for IMcpHttpConnectionResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMcpHttpConnectionResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Uri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Foundation_Collections")]
pub Headers: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
Headers: usize,
}
windows_core::imp::define_interface!(IMcpNamedPipeConnectionResult, IMcpNamedPipeConnectionResult_Vtbl, 0x8a2aef6f_b4dc_5180_a3e1_47b63dbbb70a);
impl windows_core::RuntimeType for IMcpNamedPipeConnectionResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMcpNamedPipeConnectionResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(IMcpNamedPipeConnectionServer, IMcpNamedPipeConnectionServer_Vtbl, 0x52f204a5_2ad1_5430_96c9_ea7e090be839);
impl windows_core::RuntimeType for IMcpNamedPipeConnectionServer {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IMcpNamedPipeConnectionServer, windows_core::IUnknown, windows_core::IInspectable);
impl IMcpNamedPipeConnectionServer {
pub fn Connect<P0, P2>(&self, hostcontext: P0, pipename: &windows_core::HSTRING, connectionresult: P2) -> windows_core::Result<McpNamedPipeConnectionResult>
where
P0: windows_core::Param<super::AgentContext>,
P2: windows_core::Param<McpNamedPipeConnectionResult>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Connect)(windows_core::Interface::as_raw(this), hostcontext.param().abi(), core::mem::transmute_copy(pipename), connectionresult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IMcpNamedPipeConnectionServer {
const NAME: &'static str = "Windows.AI.Agents.Mcp.IMcpNamedPipeConnectionServer";
}
pub trait IMcpNamedPipeConnectionServer_Impl: windows_core::IUnknownImpl {
fn Connect(&self, hostContext: windows_core::Ref<super::AgentContext>, pipeName: &windows_core::HSTRING, connectionResult: windows_core::Ref<McpNamedPipeConnectionResult>) -> windows_core::Result<McpNamedPipeConnectionResult>;
}
impl IMcpNamedPipeConnectionServer_Vtbl {
pub const fn new<Identity: IMcpNamedPipeConnectionServer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Connect<Identity: IMcpNamedPipeConnectionServer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hostcontext: *mut core::ffi::c_void, pipename: *mut core::ffi::c_void, connectionresult: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMcpNamedPipeConnectionServer_Impl::Connect(this, core::mem::transmute_copy(&hostcontext), core::mem::transmute(&pipename), core::mem::transmute_copy(&connectionresult)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IMcpNamedPipeConnectionServer, OFFSET>(), Connect: Connect::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMcpNamedPipeConnectionServer as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMcpNamedPipeConnectionServer_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Connect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IMcpServerRegistry, IMcpServerRegistry_Vtbl, 0x150f795b_3f93_4493_abc7_48a04fd2d7b6);
impl windows_core::RuntimeType for IMcpServerRegistry {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMcpServerRegistry_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetAgentInfos: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "UI")]
pub GetMcpConnectionInfo: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, super::super::super::UI::WindowId, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
GetMcpConnectionInfo: usize,
}
windows_core::imp::define_interface!(IMcpServerRegistryStatics, IMcpServerRegistryStatics_Vtbl, 0x4acf7fed_d300_55bc_9dde_9f433cdc903d);
impl windows_core::RuntimeType for IMcpServerRegistryStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMcpServerRegistryStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IMcpSseConnectionServer, IMcpSseConnectionServer_Vtbl, 0x6c558671_1b20_5b6b_920d_b8afc2509771);
impl windows_core::RuntimeType for IMcpSseConnectionServer {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IMcpSseConnectionServer, windows_core::IUnknown, windows_core::IInspectable);
impl IMcpSseConnectionServer {
pub fn Connect<P0, P1>(&self, hostcontext: P0, connectionresult: P1) -> windows_core::Result<McpHttpConnectionResult>
where
P0: windows_core::Param<super::AgentContext>,
P1: windows_core::Param<McpHttpConnectionResult>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Connect)(windows_core::Interface::as_raw(this), hostcontext.param().abi(), connectionresult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IMcpSseConnectionServer {
const NAME: &'static str = "Windows.AI.Agents.Mcp.IMcpSseConnectionServer";
}
pub trait IMcpSseConnectionServer_Impl: windows_core::IUnknownImpl {
fn Connect(&self, hostContext: windows_core::Ref<super::AgentContext>, connectionResult: windows_core::Ref<McpHttpConnectionResult>) -> windows_core::Result<McpHttpConnectionResult>;
}
impl IMcpSseConnectionServer_Vtbl {
pub const fn new<Identity: IMcpSseConnectionServer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Connect<Identity: IMcpSseConnectionServer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hostcontext: *mut core::ffi::c_void, connectionresult: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMcpSseConnectionServer_Impl::Connect(this, core::mem::transmute_copy(&hostcontext), core::mem::transmute_copy(&connectionresult)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IMcpSseConnectionServer, OFFSET>(), Connect: Connect::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMcpSseConnectionServer as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMcpSseConnectionServer_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Connect: 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,
}
windows_core::imp::define_interface!(IMcpStdioConnectionInfo, IMcpStdioConnectionInfo_Vtbl, 0x93d9827b_32a2_5b89_ba8a_05bd2093598e);
impl windows_core::RuntimeType for IMcpStdioConnectionInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMcpStdioConnectionInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Command: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCommandArguments: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Info: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct McpHttpConnectionResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(McpHttpConnectionResult, windows_core::IUnknown, windows_core::IInspectable);
impl McpHttpConnectionResult {
pub fn Uri(&self) -> windows_core::Result<super::super::super::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Uri)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetUri<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Foundation::Uri>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetUri)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn Headers(&self) -> windows_core::Result<super::super::super::Foundation::Collections::ValueSet> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Headers)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for McpHttpConnectionResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IMcpHttpConnectionResult>();
}
unsafe impl windows_core::Interface for McpHttpConnectionResult {
type Vtable = <IMcpHttpConnectionResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IMcpHttpConnectionResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for McpHttpConnectionResult {
const NAME: &'static str = "Windows.AI.Agents.Mcp.McpHttpConnectionResult";
}
unsafe impl Send for McpHttpConnectionResult {}
unsafe impl Sync for McpHttpConnectionResult {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct McpNamedPipeConnectionResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(McpNamedPipeConnectionResult, windows_core::IUnknown, windows_core::IInspectable);
impl McpNamedPipeConnectionResult {}
impl windows_core::RuntimeType for McpNamedPipeConnectionResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IMcpNamedPipeConnectionResult>();
}
unsafe impl windows_core::Interface for McpNamedPipeConnectionResult {
type Vtable = <IMcpNamedPipeConnectionResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IMcpNamedPipeConnectionResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for McpNamedPipeConnectionResult {
const NAME: &'static str = "Windows.AI.Agents.Mcp.McpNamedPipeConnectionResult";
}
unsafe impl Send for McpNamedPipeConnectionResult {}
unsafe impl Sync for McpNamedPipeConnectionResult {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct McpServerRegistry(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(McpServerRegistry, windows_core::IUnknown, windows_core::IInspectable);
impl McpServerRegistry {
pub fn GetAgentInfos(&self) -> windows_core::Result<windows_core::Array<super::AgentInfo>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetAgentInfos)(windows_core::Interface::as_raw(this), windows_core::Array::<super::AgentInfo>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
#[cfg(feature = "UI")]
pub fn GetMcpConnectionInfo(&self, agentid: windows_core::GUID, ownerwindowid: super::super::super::UI::WindowId) -> windows_core::Result<McpStdioConnectionInfo> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetMcpConnectionInfo)(windows_core::Interface::as_raw(this), agentid, ownerwindowid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDefault() -> windows_core::Result<McpServerRegistry> {
Self::IMcpServerRegistryStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefault)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IMcpServerRegistryStatics<R, F: FnOnce(&IMcpServerRegistryStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<McpServerRegistry, IMcpServerRegistryStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for McpServerRegistry {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IMcpServerRegistry>();
}
unsafe impl windows_core::Interface for McpServerRegistry {
type Vtable = <IMcpServerRegistry as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IMcpServerRegistry as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for McpServerRegistry {
const NAME: &'static str = "Windows.AI.Agents.Mcp.McpServerRegistry";
}
unsafe impl Send for McpServerRegistry {}
unsafe impl Sync for McpServerRegistry {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct McpStdioConnectionInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(McpStdioConnectionInfo, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(McpStdioConnectionInfo, super::super::super::Foundation::IClosable);
impl McpStdioConnectionInfo {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Command(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Command)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetCommandArguments(&self) -> windows_core::Result<windows_core::Array<windows_core::HSTRING>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetCommandArguments)(windows_core::Interface::as_raw(this), windows_core::Array::<windows_core::HSTRING>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn Info(&self) -> windows_core::Result<super::AgentInfo> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Info)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for McpStdioConnectionInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IMcpStdioConnectionInfo>();
}
unsafe impl windows_core::Interface for McpStdioConnectionInfo {
type Vtable = <IMcpStdioConnectionInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IMcpStdioConnectionInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for McpStdioConnectionInfo {
const NAME: &'static str = "Windows.AI.Agents.Mcp.McpStdioConnectionInfo";
}
unsafe impl Send for McpStdioConnectionInfo {}
unsafe impl Sync for McpStdioConnectionInfo {}
+219
View File
@@ -0,0 +1,219 @@
#[cfg(feature = "AI_Agents_Mcp")]
pub mod Mcp;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AgentAuthorizationResponse(pub i32);
impl AgentAuthorizationResponse {
pub const Denied: Self = Self(0i32);
pub const Approved: Self = Self(1i32);
}
impl windows_core::TypeKind for AgentAuthorizationResponse {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for AgentAuthorizationResponse {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.AI.Agents.AgentAuthorizationResponse;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AgentContext(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AgentContext, windows_core::IUnknown, windows_core::IInspectable);
impl AgentContext {
pub fn AppUserModelId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppUserModelId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn RequestResourceAccess<P0>(&self, resource: P0, description: &windows_core::HSTRING, reasonforasking: &windows_core::HSTRING) -> windows_core::Result<AgentAuthorizationResponse>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestResourceAccess)(windows_core::Interface::as_raw(this), resource.param().abi(), core::mem::transmute_copy(description), core::mem::transmute_copy(reasonforasking), &mut result__).map(|| result__)
}
}
pub fn GetContextForCaller() -> windows_core::Result<AgentContext> {
Self::IAgentContextStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetContextForCaller)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IAgentContextStatics<R, F: FnOnce(&IAgentContextStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AgentContext, IAgentContextStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for AgentContext {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAgentContext>();
}
unsafe impl windows_core::Interface for AgentContext {
type Vtable = <IAgentContext as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAgentContext as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AgentContext {
const NAME: &'static str = "Windows.AI.Agents.AgentContext";
}
unsafe impl Send for AgentContext {}
unsafe impl Sync for AgentContext {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AgentInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AgentInfo, windows_core::IUnknown, windows_core::IInspectable);
impl AgentInfo {
pub fn Id(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Name(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Name)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "ApplicationModel")]
pub fn GetPackage(&self) -> windows_core::Result<super::super::ApplicationModel::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPackage)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AgentInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAgentInfo>();
}
unsafe impl windows_core::Interface for AgentInfo {
type Vtable = <IAgentInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAgentInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AgentInfo {
const NAME: &'static str = "Windows.AI.Agents.AgentInfo";
}
unsafe impl Send for AgentInfo {}
unsafe impl Sync for AgentInfo {}
pub struct AgentResources;
impl AgentResources {
pub fn FileSystemRead() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FileSystemRead)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FileSystemWrite() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FileSystemWrite)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FileSystemDelete() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FileSystemDelete)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FileSystemCreate() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FileSystemCreate)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn HttpGet() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HttpGet)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn HttpPost() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HttpPost)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn HttpPut() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HttpPut)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn HttpDelete() -> windows_core::Result<windows_core::HSTRING> {
Self::IAgentResourcesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HttpDelete)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IAgentResourcesStatics<R, F: FnOnce(&IAgentResourcesStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AgentResources, IAgentResourcesStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for AgentResources {
const NAME: &'static str = "Windows.AI.Agents.AgentResources";
}
windows_core::imp::define_interface!(IAgentContext, IAgentContext_Vtbl, 0x67812fd9_f5fc_5431_b282_2fc753b0c2cd);
impl windows_core::RuntimeType for IAgentContext {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAgentContext_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppUserModelId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestResourceAccess: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut AgentAuthorizationResponse) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAgentContextStatics, IAgentContextStatics_Vtbl, 0x0625abf6_79f6_5116_a14a_91b3967fc214);
impl windows_core::RuntimeType for IAgentContextStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAgentContextStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetContextForCaller: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAgentInfo, IAgentInfo_Vtbl, 0xb023d498_59ab_410b_83e7_1ed007ee2f68);
impl windows_core::RuntimeType for IAgentInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAgentInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub Name: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "ApplicationModel")]
pub GetPackage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel"))]
GetPackage: usize,
}
windows_core::imp::define_interface!(IAgentResourcesStatics, IAgentResourcesStatics_Vtbl, 0xadedaaf8_3487_50b4_ac42_490083642b05);
impl windows_core::RuntimeType for IAgentResourcesStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAgentResourcesStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FileSystemRead: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FileSystemWrite: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FileSystemDelete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FileSystemCreate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub HttpGet: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub HttpPost: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub HttpPut: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub HttpDelete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
File diff suppressed because it is too large Load Diff
+6
View File
@@ -0,0 +1,6 @@
#[cfg(feature = "AI_Actions")]
pub mod Actions;
#[cfg(feature = "AI_Agents")]
pub mod Agents;
#[cfg(feature = "AI_MachineLearning")]
pub mod MachineLearning;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,538 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppExtension(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtension, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtension {
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AppInfo(&self) -> windows_core::Result<super::AppInfo> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppInfo)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn GetExtensionPropertiesAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Foundation::Collections::IPropertySet>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetExtensionPropertiesAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Search")]
pub fn GetPublicFolderAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Storage::StorageFolder>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPublicFolderAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AppUserModelId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IAppExtension2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppUserModelId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn GetExtensionProperties(&self) -> windows_core::Result<super::super::Foundation::Collections::IPropertySet> {
let this = &windows_core::Interface::cast::<IAppExtension3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetExtensionProperties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetPublicPath(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IAppExtension3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPublicPath)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "Storage_Search")]
pub fn GetPublicFolder(&self) -> windows_core::Result<super::super::Storage::StorageFolder> {
let this = &windows_core::Interface::cast::<IAppExtension3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPublicFolder)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppExtension {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppExtension>();
}
unsafe impl windows_core::Interface for AppExtension {
type Vtable = <IAppExtension as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppExtension as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppExtension {
const NAME: &'static str = "Windows.ApplicationModel.AppExtensions.AppExtension";
}
unsafe impl Send for AppExtension {}
unsafe impl Sync for AppExtension {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppExtensionCatalog(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtensionCatalog, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtensionCatalog {
pub fn FindAllAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<AppExtension>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAllAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestRemovePackageAsync(&self, packagefullname: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestRemovePackageAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(packagefullname), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn PackageInstalled<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<AppExtensionCatalog, AppExtensionPackageInstalledEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageInstalled)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageInstalled(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageInstalled)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageUpdating<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUpdatingEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageUpdating)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageUpdating(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageUpdating)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageUpdated<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUpdatedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageUpdated)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageUpdated(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageUpdated)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageUninstalling<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<AppExtensionCatalog, AppExtensionPackageUninstallingEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageUninstalling)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageUninstalling(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageUninstalling)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageStatusChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<AppExtensionCatalog, AppExtensionPackageStatusChangedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageStatusChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageStatusChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageStatusChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn FindAll(&self) -> windows_core::Result<windows_collections::IVectorView<AppExtension>> {
let this = &windows_core::Interface::cast::<IAppExtensionCatalog2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAll)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Open(appextensionname: &windows_core::HSTRING) -> windows_core::Result<AppExtensionCatalog> {
Self::IAppExtensionCatalogStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Open)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(appextensionname), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IAppExtensionCatalogStatics<R, F: FnOnce(&IAppExtensionCatalogStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AppExtensionCatalog, IAppExtensionCatalogStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for AppExtensionCatalog {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppExtensionCatalog>();
}
unsafe impl windows_core::Interface for AppExtensionCatalog {
type Vtable = <IAppExtensionCatalog as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppExtensionCatalog as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppExtensionCatalog {
const NAME: &'static str = "Windows.ApplicationModel.AppExtensions.AppExtensionCatalog";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppExtensionPackageInstalledEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtensionPackageInstalledEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtensionPackageInstalledEventArgs {
pub fn AppExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Extensions(&self) -> windows_core::Result<windows_collections::IVectorView<AppExtension>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Extensions)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppExtensionPackageInstalledEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppExtensionPackageInstalledEventArgs>();
}
unsafe impl windows_core::Interface for AppExtensionPackageInstalledEventArgs {
type Vtable = <IAppExtensionPackageInstalledEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppExtensionPackageInstalledEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppExtensionPackageInstalledEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.AppExtensions.AppExtensionPackageInstalledEventArgs";
}
unsafe impl Send for AppExtensionPackageInstalledEventArgs {}
unsafe impl Sync for AppExtensionPackageInstalledEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppExtensionPackageStatusChangedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtensionPackageStatusChangedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtensionPackageStatusChangedEventArgs {
pub fn AppExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppExtensionPackageStatusChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppExtensionPackageStatusChangedEventArgs>();
}
unsafe impl windows_core::Interface for AppExtensionPackageStatusChangedEventArgs {
type Vtable = <IAppExtensionPackageStatusChangedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppExtensionPackageStatusChangedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppExtensionPackageStatusChangedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.AppExtensions.AppExtensionPackageStatusChangedEventArgs";
}
unsafe impl Send for AppExtensionPackageStatusChangedEventArgs {}
unsafe impl Sync for AppExtensionPackageStatusChangedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppExtensionPackageUninstallingEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtensionPackageUninstallingEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtensionPackageUninstallingEventArgs {
pub fn AppExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppExtensionPackageUninstallingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppExtensionPackageUninstallingEventArgs>();
}
unsafe impl windows_core::Interface for AppExtensionPackageUninstallingEventArgs {
type Vtable = <IAppExtensionPackageUninstallingEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppExtensionPackageUninstallingEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppExtensionPackageUninstallingEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.AppExtensions.AppExtensionPackageUninstallingEventArgs";
}
unsafe impl Send for AppExtensionPackageUninstallingEventArgs {}
unsafe impl Sync for AppExtensionPackageUninstallingEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppExtensionPackageUpdatedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtensionPackageUpdatedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtensionPackageUpdatedEventArgs {
pub fn AppExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Extensions(&self) -> windows_core::Result<windows_collections::IVectorView<AppExtension>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Extensions)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppExtensionPackageUpdatedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppExtensionPackageUpdatedEventArgs>();
}
unsafe impl windows_core::Interface for AppExtensionPackageUpdatedEventArgs {
type Vtable = <IAppExtensionPackageUpdatedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppExtensionPackageUpdatedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppExtensionPackageUpdatedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.AppExtensions.AppExtensionPackageUpdatedEventArgs";
}
unsafe impl Send for AppExtensionPackageUpdatedEventArgs {}
unsafe impl Sync for AppExtensionPackageUpdatedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppExtensionPackageUpdatingEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtensionPackageUpdatingEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtensionPackageUpdatingEventArgs {
pub fn AppExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppExtensionPackageUpdatingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppExtensionPackageUpdatingEventArgs>();
}
unsafe impl windows_core::Interface for AppExtensionPackageUpdatingEventArgs {
type Vtable = <IAppExtensionPackageUpdatingEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppExtensionPackageUpdatingEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppExtensionPackageUpdatingEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.AppExtensions.AppExtensionPackageUpdatingEventArgs";
}
unsafe impl Send for AppExtensionPackageUpdatingEventArgs {}
unsafe impl Sync for AppExtensionPackageUpdatingEventArgs {}
windows_core::imp::define_interface!(IAppExtension, IAppExtension_Vtbl, 0x8450902c_15ed_4faf_93ea_2237bbf8cbd6);
impl windows_core::RuntimeType for IAppExtension {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtension_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Foundation_Collections")]
pub GetExtensionPropertiesAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
GetExtensionPropertiesAsync: usize,
#[cfg(feature = "Storage_Search")]
pub GetPublicFolderAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Search"))]
GetPublicFolderAsync: usize,
}
windows_core::imp::define_interface!(IAppExtension2, IAppExtension2_Vtbl, 0xab3b15f0_14f9_4b9f_9419_a349a242ef38);
impl windows_core::RuntimeType for IAppExtension2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtension2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppUserModelId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtension3, IAppExtension3_Vtbl, 0x5923c101_aa38_4009_84d9_5b54a0df30ae);
impl windows_core::RuntimeType for IAppExtension3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtension3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Foundation_Collections")]
pub GetExtensionProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
GetExtensionProperties: usize,
pub GetPublicPath: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Search")]
pub GetPublicFolder: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Search"))]
GetPublicFolder: usize,
}
windows_core::imp::define_interface!(IAppExtensionCatalog, IAppExtensionCatalog_Vtbl, 0x97872032_8426_4ad1_9084_92e88c2da200);
impl windows_core::RuntimeType for IAppExtensionCatalog {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionCatalog_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FindAllAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestRemovePackageAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PackageInstalled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageInstalled: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageUpdating: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageUpdating: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageUninstalling: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageUninstalling: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageStatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageStatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtensionCatalog2, IAppExtensionCatalog2_Vtbl, 0x50056eba_58b6_4147_b5a5_8feca6dfb49d);
impl windows_core::RuntimeType for IAppExtensionCatalog2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionCatalog2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FindAll: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtensionCatalogStatics, IAppExtensionCatalogStatics_Vtbl, 0x3c36668a_5f18_4f0b_9ce5_cab61d196f11);
impl windows_core::RuntimeType for IAppExtensionCatalogStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionCatalogStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Open: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtensionPackageInstalledEventArgs, IAppExtensionPackageInstalledEventArgs_Vtbl, 0x39e59234_3351_4a8d_9745_e7d3dd45bc48);
impl windows_core::RuntimeType for IAppExtensionPackageInstalledEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionPackageInstalledEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Extensions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtensionPackageStatusChangedEventArgs, IAppExtensionPackageStatusChangedEventArgs_Vtbl, 0x1ce17433_1153_44fd_87b1_8ae1050303df);
impl windows_core::RuntimeType for IAppExtensionPackageStatusChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionPackageStatusChangedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtensionPackageUninstallingEventArgs, IAppExtensionPackageUninstallingEventArgs_Vtbl, 0x60f160c5_171e_40ff_ae98_ab2c20dd4d75);
impl windows_core::RuntimeType for IAppExtensionPackageUninstallingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionPackageUninstallingEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtensionPackageUpdatedEventArgs, IAppExtensionPackageUpdatedEventArgs_Vtbl, 0x3a83c43f_797e_44b5_ba24_a4c8b5a543d7);
impl windows_core::RuntimeType for IAppExtensionPackageUpdatedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionPackageUpdatedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Extensions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppExtensionPackageUpdatingEventArgs, IAppExtensionPackageUpdatingEventArgs_Vtbl, 0x7ed59329_1a65_4800_a700_b321009e306a);
impl windows_core::RuntimeType for IAppExtensionPackageUpdatingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppExtensionPackageUpdatingEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,669 @@
pub struct AppServiceCatalog;
impl AppServiceCatalog {
pub fn FindAppServiceProvidersAsync(appservicename: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::AppInfo>>> {
Self::IAppServiceCatalogStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAppServiceProvidersAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(appservicename), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IAppServiceCatalogStatics<R, F: FnOnce(&IAppServiceCatalogStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AppServiceCatalog, IAppServiceCatalogStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for AppServiceCatalog {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceCatalog";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppServiceClosedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppServiceClosedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppServiceClosedEventArgs {
pub fn Status(&self) -> windows_core::Result<AppServiceClosedStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for AppServiceClosedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppServiceClosedEventArgs>();
}
unsafe impl windows_core::Interface for AppServiceClosedEventArgs {
type Vtable = <IAppServiceClosedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppServiceClosedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppServiceClosedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceClosedEventArgs";
}
unsafe impl Send for AppServiceClosedEventArgs {}
unsafe impl Sync for AppServiceClosedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AppServiceClosedStatus(pub i32);
impl AppServiceClosedStatus {
pub const Completed: Self = Self(0i32);
pub const Canceled: Self = Self(1i32);
pub const ResourceLimitsExceeded: Self = Self(2i32);
pub const Unknown: Self = Self(3i32);
}
impl windows_core::TypeKind for AppServiceClosedStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for AppServiceClosedStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.AppService.AppServiceClosedStatus;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppServiceConnection(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppServiceConnection, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(AppServiceConnection, super::super::Foundation::IClosable);
impl AppServiceConnection {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AppServiceConnection, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn AppServiceName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppServiceName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetAppServiceName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAppServiceName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn PackageFamilyName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageFamilyName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetPackageFamilyName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPackageFamilyName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn OpenAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceConnectionStatus>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn SendMessageAsync<P0>(&self, message: P0) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceResponse>>
where
P0: windows_core::Param<super::super::Foundation::Collections::ValueSet>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SendMessageAsync)(windows_core::Interface::as_raw(this), message.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestReceived<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<AppServiceConnection, AppServiceRequestReceivedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestReceived)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveRequestReceived(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveRequestReceived)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn ServiceClosed<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<AppServiceConnection, AppServiceClosedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ServiceClosed)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveServiceClosed(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveServiceClosed)(windows_core::Interface::as_raw(this), token).ok() }
}
#[cfg(feature = "System_RemoteSystems")]
pub fn OpenRemoteAsync<P0>(&self, remotesystemconnectionrequest: P0) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceConnectionStatus>>
where
P0: windows_core::Param<super::super::System::RemoteSystems::RemoteSystemConnectionRequest>,
{
let this = &windows_core::Interface::cast::<IAppServiceConnection2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenRemoteAsync)(windows_core::Interface::as_raw(this), remotesystemconnectionrequest.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "System")]
pub fn User(&self) -> windows_core::Result<super::super::System::User> {
let this = &windows_core::Interface::cast::<IAppServiceConnection2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).User)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "System")]
pub fn SetUser<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::System::User>,
{
let this = &windows_core::Interface::cast::<IAppServiceConnection2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetUser)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
#[cfg(all(feature = "Foundation_Collections", feature = "System_RemoteSystems"))]
pub fn SendStatelessMessageAsync<P0, P1, P2>(connection: P0, connectionrequest: P1, message: P2) -> windows_core::Result<windows_future::IAsyncOperation<StatelessAppServiceResponse>>
where
P0: windows_core::Param<AppServiceConnection>,
P1: windows_core::Param<super::super::System::RemoteSystems::RemoteSystemConnectionRequest>,
P2: windows_core::Param<super::super::Foundation::Collections::ValueSet>,
{
Self::IAppServiceConnectionStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SendStatelessMessageAsync)(windows_core::Interface::as_raw(this), connection.param().abi(), connectionrequest.param().abi(), message.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
fn IAppServiceConnectionStatics<R, F: FnOnce(&IAppServiceConnectionStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AppServiceConnection, IAppServiceConnectionStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for AppServiceConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppServiceConnection>();
}
unsafe impl windows_core::Interface for AppServiceConnection {
type Vtable = <IAppServiceConnection as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppServiceConnection as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppServiceConnection {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceConnection";
}
unsafe impl Send for AppServiceConnection {}
unsafe impl Sync for AppServiceConnection {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AppServiceConnectionStatus(pub i32);
impl AppServiceConnectionStatus {
pub const Success: Self = Self(0i32);
pub const AppNotInstalled: Self = Self(1i32);
pub const AppUnavailable: Self = Self(2i32);
pub const AppServiceUnavailable: Self = Self(3i32);
pub const Unknown: Self = Self(4i32);
pub const RemoteSystemUnavailable: Self = Self(5i32);
pub const RemoteSystemNotSupportedByApp: Self = Self(6i32);
pub const NotAuthorized: Self = Self(7i32);
pub const AuthenticationError: Self = Self(8i32);
pub const NetworkNotAvailable: Self = Self(9i32);
pub const DisabledByPolicy: Self = Self(10i32);
pub const WebServiceUnavailable: Self = Self(11i32);
}
impl windows_core::TypeKind for AppServiceConnectionStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for AppServiceConnectionStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.AppService.AppServiceConnectionStatus;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppServiceDeferral(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppServiceDeferral, windows_core::IUnknown, windows_core::IInspectable);
impl AppServiceDeferral {
pub fn Complete(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Complete)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for AppServiceDeferral {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppServiceDeferral>();
}
unsafe impl windows_core::Interface for AppServiceDeferral {
type Vtable = <IAppServiceDeferral as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppServiceDeferral as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppServiceDeferral {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceDeferral";
}
unsafe impl Send for AppServiceDeferral {}
unsafe impl Sync for AppServiceDeferral {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppServiceRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppServiceRequest, windows_core::IUnknown, windows_core::IInspectable);
impl AppServiceRequest {
#[cfg(feature = "Foundation_Collections")]
pub fn Message(&self) -> windows_core::Result<super::super::Foundation::Collections::ValueSet> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Message)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn SendResponseAsync<P0>(&self, message: P0) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceResponseStatus>>
where
P0: windows_core::Param<super::super::Foundation::Collections::ValueSet>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SendResponseAsync)(windows_core::Interface::as_raw(this), message.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppServiceRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppServiceRequest>();
}
unsafe impl windows_core::Interface for AppServiceRequest {
type Vtable = <IAppServiceRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppServiceRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppServiceRequest {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceRequest";
}
unsafe impl Send for AppServiceRequest {}
unsafe impl Sync for AppServiceRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppServiceRequestReceivedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppServiceRequestReceivedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppServiceRequestReceivedEventArgs {
pub fn Request(&self) -> windows_core::Result<AppServiceRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<AppServiceDeferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppServiceRequestReceivedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppServiceRequestReceivedEventArgs>();
}
unsafe impl windows_core::Interface for AppServiceRequestReceivedEventArgs {
type Vtable = <IAppServiceRequestReceivedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppServiceRequestReceivedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppServiceRequestReceivedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceRequestReceivedEventArgs";
}
unsafe impl Send for AppServiceRequestReceivedEventArgs {}
unsafe impl Sync for AppServiceRequestReceivedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppServiceResponse(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppServiceResponse, windows_core::IUnknown, windows_core::IInspectable);
impl AppServiceResponse {
#[cfg(feature = "Foundation_Collections")]
pub fn Message(&self) -> windows_core::Result<super::super::Foundation::Collections::ValueSet> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Message)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Status(&self) -> windows_core::Result<AppServiceResponseStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for AppServiceResponse {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppServiceResponse>();
}
unsafe impl windows_core::Interface for AppServiceResponse {
type Vtable = <IAppServiceResponse as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppServiceResponse as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppServiceResponse {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceResponse";
}
unsafe impl Send for AppServiceResponse {}
unsafe impl Sync for AppServiceResponse {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AppServiceResponseStatus(pub i32);
impl AppServiceResponseStatus {
pub const Success: Self = Self(0i32);
pub const Failure: Self = Self(1i32);
pub const ResourceLimitsExceeded: Self = Self(2i32);
pub const Unknown: Self = Self(3i32);
pub const RemoteSystemUnavailable: Self = Self(4i32);
pub const MessageSizeTooLarge: Self = Self(5i32);
pub const AppUnavailable: Self = Self(6i32);
pub const AuthenticationError: Self = Self(7i32);
pub const NetworkNotAvailable: Self = Self(8i32);
pub const DisabledByPolicy: Self = Self(9i32);
pub const WebServiceUnavailable: Self = Self(10i32);
}
impl windows_core::TypeKind for AppServiceResponseStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for AppServiceResponseStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.AppService.AppServiceResponseStatus;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppServiceTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppServiceTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl AppServiceTriggerDetails {
pub fn Name(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Name)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn CallerPackageFamilyName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CallerPackageFamilyName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppServiceConnection(&self) -> windows_core::Result<AppServiceConnection> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppServiceConnection)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IsRemoteSystemConnection(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IAppServiceTriggerDetails2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsRemoteSystemConnection)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CheckCallerForCapabilityAsync(&self, capabilityname: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
let this = &windows_core::Interface::cast::<IAppServiceTriggerDetails3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CheckCallerForCapabilityAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(capabilityname), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn CallerRemoteConnectionToken(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IAppServiceTriggerDetails4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CallerRemoteConnectionToken)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for AppServiceTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppServiceTriggerDetails>();
}
unsafe impl windows_core::Interface for AppServiceTriggerDetails {
type Vtable = <IAppServiceTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppServiceTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppServiceTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.AppService.AppServiceTriggerDetails";
}
unsafe impl Send for AppServiceTriggerDetails {}
unsafe impl Sync for AppServiceTriggerDetails {}
windows_core::imp::define_interface!(IAppServiceCatalogStatics, IAppServiceCatalogStatics_Vtbl, 0xef0d2507_d132_4c85_8395_3c31d5a1e941);
impl windows_core::RuntimeType for IAppServiceCatalogStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceCatalogStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FindAppServiceProvidersAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceClosedEventArgs, IAppServiceClosedEventArgs_Vtbl, 0xde6016f6_cb03_4d35_ac8d_cc6303239731);
impl windows_core::RuntimeType for IAppServiceClosedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceClosedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut AppServiceClosedStatus) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceConnection, IAppServiceConnection_Vtbl, 0x9dd474a2_871f_4d52_89a9_9e090531bd27);
impl windows_core::RuntimeType for IAppServiceConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceConnection_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppServiceName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAppServiceName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub OpenAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Foundation_Collections")]
pub SendMessageAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
SendMessageAsync: usize,
pub RequestReceived: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveRequestReceived: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub ServiceClosed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveServiceClosed: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceConnection2, IAppServiceConnection2_Vtbl, 0x8bdfcd5f_2302_4fbd_8061_52511c2f8bf9);
impl windows_core::RuntimeType for IAppServiceConnection2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceConnection2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "System_RemoteSystems")]
pub OpenRemoteAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "System_RemoteSystems"))]
OpenRemoteAsync: usize,
#[cfg(feature = "System")]
pub User: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "System"))]
User: usize,
#[cfg(feature = "System")]
pub SetUser: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "System"))]
SetUser: usize,
}
windows_core::imp::define_interface!(IAppServiceConnectionStatics, IAppServiceConnectionStatics_Vtbl, 0xadc56ce9_d408_5673_8637_827a4b274168);
impl windows_core::RuntimeType for IAppServiceConnectionStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceConnectionStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(all(feature = "Foundation_Collections", feature = "System_RemoteSystems"))]
pub SendStatelessMessageAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Foundation_Collections", feature = "System_RemoteSystems")))]
SendStatelessMessageAsync: usize,
}
windows_core::imp::define_interface!(IAppServiceDeferral, IAppServiceDeferral_Vtbl, 0x7e1b5322_eab0_4248_ae04_fdf93838e472);
impl windows_core::RuntimeType for IAppServiceDeferral {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceDeferral_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Complete: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceRequest, IAppServiceRequest_Vtbl, 0x20e58d9d_18de_4b01_80ba_90a76204e3c8);
impl windows_core::RuntimeType for IAppServiceRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Foundation_Collections")]
pub Message: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
Message: usize,
#[cfg(feature = "Foundation_Collections")]
pub SendResponseAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
SendResponseAsync: usize,
}
windows_core::imp::define_interface!(IAppServiceRequestReceivedEventArgs, IAppServiceRequestReceivedEventArgs_Vtbl, 0x6e122360_ff65_44ae_9e45_857fe4180681);
impl windows_core::RuntimeType for IAppServiceRequestReceivedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceRequestReceivedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceResponse, IAppServiceResponse_Vtbl, 0x8d503cec_9aa3_4e68_9559_9de63e372ce4);
impl windows_core::RuntimeType for IAppServiceResponse {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceResponse_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Foundation_Collections")]
pub Message: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
Message: usize,
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut AppServiceResponseStatus) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceTriggerDetails, IAppServiceTriggerDetails_Vtbl, 0x88a2dcac_ad28_41b8_80bb_bdf1b2169e19);
impl windows_core::RuntimeType for IAppServiceTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Name: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CallerPackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppServiceConnection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceTriggerDetails2, IAppServiceTriggerDetails2_Vtbl, 0xe83d54b2_28cc_43f2_b465_c0482e59e2dc);
impl windows_core::RuntimeType for IAppServiceTriggerDetails2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceTriggerDetails2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsRemoteSystemConnection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceTriggerDetails3, IAppServiceTriggerDetails3_Vtbl, 0xfbd71e21_7939_4e68_9e3c_7780147aabb6);
impl windows_core::RuntimeType for IAppServiceTriggerDetails3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceTriggerDetails3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CheckCallerForCapabilityAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppServiceTriggerDetails4, IAppServiceTriggerDetails4_Vtbl, 0x1185b180_8861_5e30_ab55_1cf4d08bbf6d);
impl windows_core::RuntimeType for IAppServiceTriggerDetails4 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppServiceTriggerDetails4_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CallerRemoteConnectionToken: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IStatelessAppServiceResponse, IStatelessAppServiceResponse_Vtbl, 0x43754af7_a9ec_52fe_82e7_939b68dc9388);
impl windows_core::RuntimeType for IStatelessAppServiceResponse {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IStatelessAppServiceResponse_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Foundation_Collections")]
pub Message: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
Message: usize,
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut StatelessAppServiceResponseStatus) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct StatelessAppServiceResponse(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(StatelessAppServiceResponse, windows_core::IUnknown, windows_core::IInspectable);
impl StatelessAppServiceResponse {
#[cfg(feature = "Foundation_Collections")]
pub fn Message(&self) -> windows_core::Result<super::super::Foundation::Collections::ValueSet> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Message)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Status(&self) -> windows_core::Result<StatelessAppServiceResponseStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for StatelessAppServiceResponse {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IStatelessAppServiceResponse>();
}
unsafe impl windows_core::Interface for StatelessAppServiceResponse {
type Vtable = <IStatelessAppServiceResponse as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IStatelessAppServiceResponse as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for StatelessAppServiceResponse {
const NAME: &'static str = "Windows.ApplicationModel.AppService.StatelessAppServiceResponse";
}
unsafe impl Send for StatelessAppServiceResponse {}
unsafe impl Sync for StatelessAppServiceResponse {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct StatelessAppServiceResponseStatus(pub i32);
impl StatelessAppServiceResponseStatus {
pub const Success: Self = Self(0i32);
pub const AppNotInstalled: Self = Self(1i32);
pub const AppUnavailable: Self = Self(2i32);
pub const AppServiceUnavailable: Self = Self(3i32);
pub const RemoteSystemUnavailable: Self = Self(4i32);
pub const RemoteSystemNotSupportedByApp: Self = Self(5i32);
pub const NotAuthorized: Self = Self(6i32);
pub const ResourceLimitsExceeded: Self = Self(7i32);
pub const MessageSizeTooLarge: Self = Self(8i32);
pub const Failure: Self = Self(9i32);
pub const Unknown: Self = Self(10i32);
pub const AuthenticationError: Self = Self(11i32);
pub const NetworkNotAvailable: Self = Self(12i32);
pub const DisabledByPolicy: Self = Self(13i32);
pub const WebServiceUnavailable: Self = Self(14i32);
}
impl windows_core::TypeKind for StatelessAppServiceResponseStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for StatelessAppServiceResponseStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.AppService.StatelessAppServiceResponseStatus;i4)");
}
@@ -0,0 +1,280 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AddAppointmentOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AddAppointmentOperation, windows_core::IUnknown, windows_core::IInspectable);
impl AddAppointmentOperation {
pub fn AppointmentInformation(&self) -> windows_core::Result<super::Appointment> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentInformation)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SourcePackageFamilyName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SourcePackageFamilyName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompleted(&self, itemid: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompleted)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(itemid)).ok() }
}
pub fn ReportCanceled(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCanceled)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportError(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportError)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn DismissUI(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).DismissUI)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for AddAppointmentOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAddAppointmentOperation>();
}
unsafe impl windows_core::Interface for AddAppointmentOperation {
type Vtable = <IAddAppointmentOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAddAppointmentOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AddAppointmentOperation {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.AppointmentsProvider.AddAppointmentOperation";
}
unsafe impl Send for AddAppointmentOperation {}
unsafe impl Sync for AddAppointmentOperation {}
pub struct AppointmentsProviderLaunchActionVerbs;
impl AppointmentsProviderLaunchActionVerbs {
pub fn AddAppointment() -> windows_core::Result<windows_core::HSTRING> {
Self::IAppointmentsProviderLaunchActionVerbsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddAppointment)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn ReplaceAppointment() -> windows_core::Result<windows_core::HSTRING> {
Self::IAppointmentsProviderLaunchActionVerbsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReplaceAppointment)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn RemoveAppointment() -> windows_core::Result<windows_core::HSTRING> {
Self::IAppointmentsProviderLaunchActionVerbsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RemoveAppointment)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn ShowTimeFrame() -> windows_core::Result<windows_core::HSTRING> {
Self::IAppointmentsProviderLaunchActionVerbsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowTimeFrame)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn ShowAppointmentDetails() -> windows_core::Result<windows_core::HSTRING> {
Self::IAppointmentsProviderLaunchActionVerbsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowAppointmentDetails)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IAppointmentsProviderLaunchActionVerbsStatics<R, F: FnOnce(&IAppointmentsProviderLaunchActionVerbsStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AppointmentsProviderLaunchActionVerbs, IAppointmentsProviderLaunchActionVerbsStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IAppointmentsProviderLaunchActionVerbsStatics2<R, F: FnOnce(&IAppointmentsProviderLaunchActionVerbsStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AppointmentsProviderLaunchActionVerbs, IAppointmentsProviderLaunchActionVerbsStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for AppointmentsProviderLaunchActionVerbs {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.AppointmentsProvider.AppointmentsProviderLaunchActionVerbs";
}
windows_core::imp::define_interface!(IAddAppointmentOperation, IAddAppointmentOperation_Vtbl, 0xec4a9af3_620d_4c69_add7_9794e918081f);
impl windows_core::RuntimeType for IAddAppointmentOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAddAppointmentOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentInformation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SourcePackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCanceled: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DismissUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentsProviderLaunchActionVerbsStatics, IAppointmentsProviderLaunchActionVerbsStatics_Vtbl, 0x36dbba28_9e2e_49c6_8ef7_3ab7a5dcc8b8);
impl windows_core::RuntimeType for IAppointmentsProviderLaunchActionVerbsStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentsProviderLaunchActionVerbsStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AddAppointment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReplaceAppointment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveAppointment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ShowTimeFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentsProviderLaunchActionVerbsStatics2, IAppointmentsProviderLaunchActionVerbsStatics2_Vtbl, 0xef9049a4_af21_473c_88dc_76cd89f60ca5);
impl windows_core::RuntimeType for IAppointmentsProviderLaunchActionVerbsStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentsProviderLaunchActionVerbsStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ShowAppointmentDetails: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRemoveAppointmentOperation, IRemoveAppointmentOperation_Vtbl, 0x08b66aba_fe33_46cd_a50c_a8ffb3260537);
impl windows_core::RuntimeType for IRemoveAppointmentOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRemoveAppointmentOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub InstanceStartDate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SourcePackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompleted: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCanceled: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DismissUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IReplaceAppointmentOperation, IReplaceAppointmentOperation_Vtbl, 0xf4903d9b_9e61_4de2_a732_2687c07d1de8);
impl windows_core::RuntimeType for IReplaceAppointmentOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IReplaceAppointmentOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentInformation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub InstanceStartDate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SourcePackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCanceled: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DismissUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RemoveAppointmentOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RemoveAppointmentOperation, windows_core::IUnknown, windows_core::IInspectable);
impl RemoveAppointmentOperation {
pub fn AppointmentId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn InstanceStartDate(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::DateTime>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InstanceStartDate)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SourcePackageFamilyName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SourcePackageFamilyName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompleted(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompleted)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportCanceled(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCanceled)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportError(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportError)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn DismissUI(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).DismissUI)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for RemoveAppointmentOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRemoveAppointmentOperation>();
}
unsafe impl windows_core::Interface for RemoveAppointmentOperation {
type Vtable = <IRemoveAppointmentOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRemoveAppointmentOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RemoveAppointmentOperation {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation";
}
unsafe impl Send for RemoveAppointmentOperation {}
unsafe impl Sync for RemoveAppointmentOperation {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ReplaceAppointmentOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ReplaceAppointmentOperation, windows_core::IUnknown, windows_core::IInspectable);
impl ReplaceAppointmentOperation {
pub fn AppointmentId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentInformation(&self) -> windows_core::Result<super::Appointment> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentInformation)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn InstanceStartDate(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::DateTime>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InstanceStartDate)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SourcePackageFamilyName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SourcePackageFamilyName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompleted(&self, itemid: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompleted)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(itemid)).ok() }
}
pub fn ReportCanceled(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCanceled)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportError(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportError)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn DismissUI(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).DismissUI)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for ReplaceAppointmentOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IReplaceAppointmentOperation>();
}
unsafe impl windows_core::Interface for ReplaceAppointmentOperation {
type Vtable = <IReplaceAppointmentOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IReplaceAppointmentOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ReplaceAppointmentOperation {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation";
}
unsafe impl Send for ReplaceAppointmentOperation {}
unsafe impl Sync for ReplaceAppointmentOperation {}
@@ -0,0 +1,938 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarCancelMeetingRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarCancelMeetingRequest, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarCancelMeetingRequest {
pub fn AppointmentCalendarLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentCalendarLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentOriginalStartTime(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::DateTime>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentOriginalStartTime)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Subject(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Subject)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Comment(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Comment)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn NotifyInvitees(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NotifyInvitees)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarCancelMeetingRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarCancelMeetingRequest>();
}
unsafe impl windows_core::Interface for AppointmentCalendarCancelMeetingRequest {
type Vtable = <IAppointmentCalendarCancelMeetingRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarCancelMeetingRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarCancelMeetingRequest {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarCancelMeetingRequest";
}
unsafe impl Send for AppointmentCalendarCancelMeetingRequest {}
unsafe impl Sync for AppointmentCalendarCancelMeetingRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarCancelMeetingRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarCancelMeetingRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarCancelMeetingRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<AppointmentCalendarCancelMeetingRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarCancelMeetingRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarCancelMeetingRequestEventArgs>();
}
unsafe impl windows_core::Interface for AppointmentCalendarCancelMeetingRequestEventArgs {
type Vtable = <IAppointmentCalendarCancelMeetingRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarCancelMeetingRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarCancelMeetingRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarCancelMeetingRequestEventArgs";
}
unsafe impl Send for AppointmentCalendarCancelMeetingRequestEventArgs {}
unsafe impl Sync for AppointmentCalendarCancelMeetingRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarCreateOrUpdateAppointmentRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarCreateOrUpdateAppointmentRequest, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarCreateOrUpdateAppointmentRequest {
pub fn AppointmentCalendarLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentCalendarLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Appointment(&self) -> windows_core::Result<super::Appointment> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Appointment)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn NotifyInvitees(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NotifyInvitees)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ChangedProperties(&self) -> windows_core::Result<windows_collections::IVectorView<windows_core::HSTRING>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChangedProperties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportCompletedAsync<P0>(&self, createdorupdatedappointment: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::Appointment>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), createdorupdatedappointment.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarCreateOrUpdateAppointmentRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarCreateOrUpdateAppointmentRequest>();
}
unsafe impl windows_core::Interface for AppointmentCalendarCreateOrUpdateAppointmentRequest {
type Vtable = <IAppointmentCalendarCreateOrUpdateAppointmentRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarCreateOrUpdateAppointmentRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarCreateOrUpdateAppointmentRequest {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarCreateOrUpdateAppointmentRequest";
}
unsafe impl Send for AppointmentCalendarCreateOrUpdateAppointmentRequest {}
unsafe impl Sync for AppointmentCalendarCreateOrUpdateAppointmentRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<AppointmentCalendarCreateOrUpdateAppointmentRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs>();
}
unsafe impl windows_core::Interface for AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs {
type Vtable = <IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs";
}
unsafe impl Send for AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs {}
unsafe impl Sync for AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarForwardMeetingRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarForwardMeetingRequest, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarForwardMeetingRequest {
pub fn AppointmentCalendarLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentCalendarLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentOriginalStartTime(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::DateTime>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentOriginalStartTime)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Invitees(&self) -> windows_core::Result<windows_collections::IVectorView<super::AppointmentInvitee>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Invitees)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Subject(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Subject)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ForwardHeader(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ForwardHeader)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Comment(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Comment)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarForwardMeetingRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarForwardMeetingRequest>();
}
unsafe impl windows_core::Interface for AppointmentCalendarForwardMeetingRequest {
type Vtable = <IAppointmentCalendarForwardMeetingRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarForwardMeetingRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarForwardMeetingRequest {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarForwardMeetingRequest";
}
unsafe impl Send for AppointmentCalendarForwardMeetingRequest {}
unsafe impl Sync for AppointmentCalendarForwardMeetingRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarForwardMeetingRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarForwardMeetingRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarForwardMeetingRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<AppointmentCalendarForwardMeetingRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarForwardMeetingRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarForwardMeetingRequestEventArgs>();
}
unsafe impl windows_core::Interface for AppointmentCalendarForwardMeetingRequestEventArgs {
type Vtable = <IAppointmentCalendarForwardMeetingRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarForwardMeetingRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarForwardMeetingRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarForwardMeetingRequestEventArgs";
}
unsafe impl Send for AppointmentCalendarForwardMeetingRequestEventArgs {}
unsafe impl Sync for AppointmentCalendarForwardMeetingRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarProposeNewTimeForMeetingRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarProposeNewTimeForMeetingRequest, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarProposeNewTimeForMeetingRequest {
pub fn AppointmentCalendarLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentCalendarLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentOriginalStartTime(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::DateTime>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentOriginalStartTime)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn NewStartTime(&self) -> windows_core::Result<super::super::super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NewStartTime)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn NewDuration(&self) -> windows_core::Result<super::super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NewDuration)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Subject(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Subject)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Comment(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Comment)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarProposeNewTimeForMeetingRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarProposeNewTimeForMeetingRequest>();
}
unsafe impl windows_core::Interface for AppointmentCalendarProposeNewTimeForMeetingRequest {
type Vtable = <IAppointmentCalendarProposeNewTimeForMeetingRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarProposeNewTimeForMeetingRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarProposeNewTimeForMeetingRequest {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarProposeNewTimeForMeetingRequest";
}
unsafe impl Send for AppointmentCalendarProposeNewTimeForMeetingRequest {}
unsafe impl Sync for AppointmentCalendarProposeNewTimeForMeetingRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<AppointmentCalendarProposeNewTimeForMeetingRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs>();
}
unsafe impl windows_core::Interface for AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs {
type Vtable = <IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs";
}
unsafe impl Send for AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs {}
unsafe impl Sync for AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarSyncManagerSyncRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarSyncManagerSyncRequest, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarSyncManagerSyncRequest {
pub fn AppointmentCalendarLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentCalendarLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarSyncManagerSyncRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarSyncManagerSyncRequest>();
}
unsafe impl windows_core::Interface for AppointmentCalendarSyncManagerSyncRequest {
type Vtable = <IAppointmentCalendarSyncManagerSyncRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarSyncManagerSyncRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarSyncManagerSyncRequest {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarSyncManagerSyncRequest";
}
unsafe impl Send for AppointmentCalendarSyncManagerSyncRequest {}
unsafe impl Sync for AppointmentCalendarSyncManagerSyncRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarSyncManagerSyncRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarSyncManagerSyncRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarSyncManagerSyncRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<AppointmentCalendarSyncManagerSyncRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarSyncManagerSyncRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarSyncManagerSyncRequestEventArgs>();
}
unsafe impl windows_core::Interface for AppointmentCalendarSyncManagerSyncRequestEventArgs {
type Vtable = <IAppointmentCalendarSyncManagerSyncRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarSyncManagerSyncRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarSyncManagerSyncRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarSyncManagerSyncRequestEventArgs";
}
unsafe impl Send for AppointmentCalendarSyncManagerSyncRequestEventArgs {}
unsafe impl Sync for AppointmentCalendarSyncManagerSyncRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarUpdateMeetingResponseRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarUpdateMeetingResponseRequest, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarUpdateMeetingResponseRequest {
pub fn AppointmentCalendarLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentCalendarLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentLocalId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentLocalId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn AppointmentOriginalStartTime(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::DateTime>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppointmentOriginalStartTime)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Response(&self) -> windows_core::Result<super::AppointmentParticipantResponse> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Response)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Subject(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Subject)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Comment(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Comment)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SendUpdate(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SendUpdate)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarUpdateMeetingResponseRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarUpdateMeetingResponseRequest>();
}
unsafe impl windows_core::Interface for AppointmentCalendarUpdateMeetingResponseRequest {
type Vtable = <IAppointmentCalendarUpdateMeetingResponseRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarUpdateMeetingResponseRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarUpdateMeetingResponseRequest {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarUpdateMeetingResponseRequest";
}
unsafe impl Send for AppointmentCalendarUpdateMeetingResponseRequest {}
unsafe impl Sync for AppointmentCalendarUpdateMeetingResponseRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentCalendarUpdateMeetingResponseRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentCalendarUpdateMeetingResponseRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentCalendarUpdateMeetingResponseRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<AppointmentCalendarUpdateMeetingResponseRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentCalendarUpdateMeetingResponseRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentCalendarUpdateMeetingResponseRequestEventArgs>();
}
unsafe impl windows_core::Interface for AppointmentCalendarUpdateMeetingResponseRequestEventArgs {
type Vtable = <IAppointmentCalendarUpdateMeetingResponseRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentCalendarUpdateMeetingResponseRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentCalendarUpdateMeetingResponseRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentCalendarUpdateMeetingResponseRequestEventArgs";
}
unsafe impl Send for AppointmentCalendarUpdateMeetingResponseRequestEventArgs {}
unsafe impl Sync for AppointmentCalendarUpdateMeetingResponseRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentDataProviderConnection(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentDataProviderConnection, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentDataProviderConnection {
pub fn SyncRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<AppointmentDataProviderConnection, AppointmentCalendarSyncManagerSyncRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SyncRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveSyncRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveSyncRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn CreateOrUpdateAppointmentRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<AppointmentDataProviderConnection, AppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateOrUpdateAppointmentRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveCreateOrUpdateAppointmentRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveCreateOrUpdateAppointmentRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn CancelMeetingRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<AppointmentDataProviderConnection, AppointmentCalendarCancelMeetingRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CancelMeetingRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveCancelMeetingRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveCancelMeetingRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn ForwardMeetingRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<AppointmentDataProviderConnection, AppointmentCalendarForwardMeetingRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ForwardMeetingRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveForwardMeetingRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveForwardMeetingRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn ProposeNewTimeForMeetingRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<AppointmentDataProviderConnection, AppointmentCalendarProposeNewTimeForMeetingRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ProposeNewTimeForMeetingRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveProposeNewTimeForMeetingRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveProposeNewTimeForMeetingRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn UpdateMeetingResponseRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<AppointmentDataProviderConnection, AppointmentCalendarUpdateMeetingResponseRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UpdateMeetingResponseRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveUpdateMeetingResponseRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveUpdateMeetingResponseRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for AppointmentDataProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentDataProviderConnection>();
}
unsafe impl windows_core::Interface for AppointmentDataProviderConnection {
type Vtable = <IAppointmentDataProviderConnection as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentDataProviderConnection as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentDataProviderConnection {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentDataProviderConnection";
}
unsafe impl Send for AppointmentDataProviderConnection {}
unsafe impl Sync for AppointmentDataProviderConnection {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AppointmentDataProviderTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppointmentDataProviderTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl AppointmentDataProviderTriggerDetails {
pub fn Connection(&self) -> windows_core::Result<AppointmentDataProviderConnection> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Connection)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for AppointmentDataProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAppointmentDataProviderTriggerDetails>();
}
unsafe impl windows_core::Interface for AppointmentDataProviderTriggerDetails {
type Vtable = <IAppointmentDataProviderTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAppointmentDataProviderTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AppointmentDataProviderTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.DataProvider.AppointmentDataProviderTriggerDetails";
}
unsafe impl Send for AppointmentDataProviderTriggerDetails {}
unsafe impl Sync for AppointmentDataProviderTriggerDetails {}
windows_core::imp::define_interface!(IAppointmentCalendarCancelMeetingRequest, IAppointmentCalendarCancelMeetingRequest_Vtbl, 0x49460f8d_6434_40d7_ad46_6297419314d1);
impl windows_core::RuntimeType for IAppointmentCalendarCancelMeetingRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarCancelMeetingRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentCalendarLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentOriginalStartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Subject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Comment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub NotifyInvitees: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarCancelMeetingRequestEventArgs, IAppointmentCalendarCancelMeetingRequestEventArgs_Vtbl, 0x1a79be16_7f30_4e35_beef_9d2c7b6dcae1);
impl windows_core::RuntimeType for IAppointmentCalendarCancelMeetingRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarCancelMeetingRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarCreateOrUpdateAppointmentRequest, IAppointmentCalendarCreateOrUpdateAppointmentRequest_Vtbl, 0x2e62f2b2_ca96_48ac_9124_406b19fefa70);
impl windows_core::RuntimeType for IAppointmentCalendarCreateOrUpdateAppointmentRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarCreateOrUpdateAppointmentRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentCalendarLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Appointment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub NotifyInvitees: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ChangedProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs, IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs_Vtbl, 0xcf8ded28_002e_4bf7_8e9d_5e20d49aa3ba);
impl windows_core::RuntimeType for IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarCreateOrUpdateAppointmentRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarForwardMeetingRequest, IAppointmentCalendarForwardMeetingRequest_Vtbl, 0x82e5ee56_26b6_4253_8a8f_6cf5f2ff7884);
impl windows_core::RuntimeType for IAppointmentCalendarForwardMeetingRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarForwardMeetingRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentCalendarLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentOriginalStartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Invitees: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Subject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ForwardHeader: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Comment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarForwardMeetingRequestEventArgs, IAppointmentCalendarForwardMeetingRequestEventArgs_Vtbl, 0x3109151a_23a2_42fd_9c82_c9a60d59f8a8);
impl windows_core::RuntimeType for IAppointmentCalendarForwardMeetingRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarForwardMeetingRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarProposeNewTimeForMeetingRequest, IAppointmentCalendarProposeNewTimeForMeetingRequest_Vtbl, 0xce1c63f5_edf6_43c3_82b7_be6b368c6900);
impl windows_core::RuntimeType for IAppointmentCalendarProposeNewTimeForMeetingRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarProposeNewTimeForMeetingRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentCalendarLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentOriginalStartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub NewStartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::DateTime) -> windows_core::HRESULT,
pub NewDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub Subject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Comment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs, IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs_Vtbl, 0xd2d777d8_fed1_4280_a3ba_2e1f47609aa2);
impl windows_core::RuntimeType for IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarProposeNewTimeForMeetingRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarSyncManagerSyncRequest, IAppointmentCalendarSyncManagerSyncRequest_Vtbl, 0x12ab382b_7163_4a56_9a4e_7223a84adf46);
impl windows_core::RuntimeType for IAppointmentCalendarSyncManagerSyncRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarSyncManagerSyncRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentCalendarLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarSyncManagerSyncRequestEventArgs, IAppointmentCalendarSyncManagerSyncRequestEventArgs_Vtbl, 0xca17c6f7_0284_4edd_87ba_4d8f69dcf5c0);
impl windows_core::RuntimeType for IAppointmentCalendarSyncManagerSyncRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarSyncManagerSyncRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarUpdateMeetingResponseRequest, IAppointmentCalendarUpdateMeetingResponseRequest_Vtbl, 0xa36d608c_c29d_4b94_b086_7e9ff7bd84a0);
impl windows_core::RuntimeType for IAppointmentCalendarUpdateMeetingResponseRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarUpdateMeetingResponseRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AppointmentCalendarLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentLocalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppointmentOriginalStartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Response: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::AppointmentParticipantResponse) -> windows_core::HRESULT,
pub Subject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Comment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SendUpdate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentCalendarUpdateMeetingResponseRequestEventArgs, IAppointmentCalendarUpdateMeetingResponseRequestEventArgs_Vtbl, 0x88759883_97bf_479d_aed5_0be8ce567d1e);
impl windows_core::RuntimeType for IAppointmentCalendarUpdateMeetingResponseRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentCalendarUpdateMeetingResponseRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentDataProviderConnection, IAppointmentDataProviderConnection_Vtbl, 0xf3dd9d83_3254_465f_abdb_928046552cf4);
impl windows_core::RuntimeType for IAppointmentDataProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentDataProviderConnection_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SyncRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveSyncRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub CreateOrUpdateAppointmentRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveCreateOrUpdateAppointmentRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub CancelMeetingRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveCancelMeetingRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub ForwardMeetingRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveForwardMeetingRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub ProposeNewTimeForMeetingRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveProposeNewTimeForMeetingRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub UpdateMeetingResponseRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveUpdateMeetingResponseRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAppointmentDataProviderTriggerDetails, IAppointmentDataProviderTriggerDetails_Vtbl, 0xb3283c01_7e12_4e5e_b1ef_74fb68ac6f2a);
impl windows_core::RuntimeType for IAppointmentDataProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAppointmentDataProviderTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Connection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,430 @@
windows_core::imp::define_interface!(IPhoneCallBlockedTriggerDetails, IPhoneCallBlockedTriggerDetails_Vtbl, 0xa4a690a2_e4c1_427f_864e_e470477ddb67);
impl windows_core::RuntimeType for IPhoneCallBlockedTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallBlockedTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PhoneNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub LineId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub CallBlockedReason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PhoneCallBlockedReason) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneCallOriginDataRequestTriggerDetails, IPhoneCallOriginDataRequestTriggerDetails_Vtbl, 0x6e9b5b3f_c54b_4e82_4cc9_e329a4184592);
impl windows_core::RuntimeType for IPhoneCallOriginDataRequestTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallOriginDataRequestTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub PhoneNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneIncomingCallDismissedTriggerDetails, IPhoneIncomingCallDismissedTriggerDetails_Vtbl, 0xbad30276_83b6_5732_9c38_0c206546196a);
impl windows_core::RuntimeType for IPhoneIncomingCallDismissedTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneIncomingCallDismissedTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub LineId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub PhoneNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DismissalTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::DateTime) -> windows_core::HRESULT,
pub TextReplyMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Reason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PhoneIncomingCallDismissedReason) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneIncomingCallNotificationTriggerDetails, IPhoneIncomingCallNotificationTriggerDetails_Vtbl, 0x2b0e6044_9b32_5d42_8222_d2812e39fb21);
impl windows_core::RuntimeType for IPhoneIncomingCallNotificationTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneIncomingCallNotificationTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub LineId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub CallId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneLineChangedTriggerDetails, IPhoneLineChangedTriggerDetails_Vtbl, 0xc6d321e7_d11d_40d8_b2b7_e40a01d66249);
impl windows_core::RuntimeType for IPhoneLineChangedTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneLineChangedTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub LineId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub ChangeType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PhoneLineChangeKind) -> windows_core::HRESULT,
pub HasLinePropertyChanged: unsafe extern "system" fn(*mut core::ffi::c_void, PhoneLineProperties, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneNewVoicemailMessageTriggerDetails, IPhoneNewVoicemailMessageTriggerDetails_Vtbl, 0x13a8c01b_b831_48d3_8ba9_8d22a6580dcf);
impl windows_core::RuntimeType for IPhoneNewVoicemailMessageTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneNewVoicemailMessageTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub LineId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub VoicemailCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub OperatorMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PhoneCallBlockedReason(pub i32);
impl PhoneCallBlockedReason {
pub const InCallBlockingList: Self = Self(0i32);
pub const PrivateNumber: Self = Self(1i32);
pub const UnknownNumber: Self = Self(2i32);
}
impl windows_core::TypeKind for PhoneCallBlockedReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PhoneCallBlockedReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Calls.Background.PhoneCallBlockedReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PhoneCallBlockedTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PhoneCallBlockedTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PhoneCallBlockedTriggerDetails {
pub fn PhoneNumber(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhoneNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn LineId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LineId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CallBlockedReason(&self) -> windows_core::Result<PhoneCallBlockedReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CallBlockedReason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PhoneCallBlockedTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPhoneCallBlockedTriggerDetails>();
}
unsafe impl windows_core::Interface for PhoneCallBlockedTriggerDetails {
type Vtable = <IPhoneCallBlockedTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPhoneCallBlockedTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PhoneCallBlockedTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Background.PhoneCallBlockedTriggerDetails";
}
unsafe impl Send for PhoneCallBlockedTriggerDetails {}
unsafe impl Sync for PhoneCallBlockedTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PhoneCallOriginDataRequestTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PhoneCallOriginDataRequestTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PhoneCallOriginDataRequestTriggerDetails {
pub fn RequestId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PhoneNumber(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhoneNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for PhoneCallOriginDataRequestTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPhoneCallOriginDataRequestTriggerDetails>();
}
unsafe impl windows_core::Interface for PhoneCallOriginDataRequestTriggerDetails {
type Vtable = <IPhoneCallOriginDataRequestTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPhoneCallOriginDataRequestTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PhoneCallOriginDataRequestTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Background.PhoneCallOriginDataRequestTriggerDetails";
}
unsafe impl Send for PhoneCallOriginDataRequestTriggerDetails {}
unsafe impl Sync for PhoneCallOriginDataRequestTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PhoneIncomingCallDismissedReason(pub i32);
impl PhoneIncomingCallDismissedReason {
pub const Unknown: Self = Self(0i32);
pub const CallRejected: Self = Self(1i32);
pub const TextReply: Self = Self(2i32);
pub const ConnectionLost: Self = Self(3i32);
}
impl windows_core::TypeKind for PhoneIncomingCallDismissedReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PhoneIncomingCallDismissedReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PhoneIncomingCallDismissedTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PhoneIncomingCallDismissedTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PhoneIncomingCallDismissedTriggerDetails {
pub fn LineId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LineId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PhoneNumber(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhoneNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn DismissalTime(&self) -> windows_core::Result<super::super::super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DismissalTime)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn TextReplyMessage(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TextReplyMessage)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Reason(&self) -> windows_core::Result<PhoneIncomingCallDismissedReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Reason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PhoneIncomingCallDismissedTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPhoneIncomingCallDismissedTriggerDetails>();
}
unsafe impl windows_core::Interface for PhoneIncomingCallDismissedTriggerDetails {
type Vtable = <IPhoneIncomingCallDismissedTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPhoneIncomingCallDismissedTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PhoneIncomingCallDismissedTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Background.PhoneIncomingCallDismissedTriggerDetails";
}
unsafe impl Send for PhoneIncomingCallDismissedTriggerDetails {}
unsafe impl Sync for PhoneIncomingCallDismissedTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PhoneIncomingCallNotificationTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PhoneIncomingCallNotificationTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PhoneIncomingCallNotificationTriggerDetails {
pub fn LineId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LineId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CallId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CallId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for PhoneIncomingCallNotificationTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPhoneIncomingCallNotificationTriggerDetails>();
}
unsafe impl windows_core::Interface for PhoneIncomingCallNotificationTriggerDetails {
type Vtable = <IPhoneIncomingCallNotificationTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPhoneIncomingCallNotificationTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PhoneIncomingCallNotificationTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Background.PhoneIncomingCallNotificationTriggerDetails";
}
unsafe impl Send for PhoneIncomingCallNotificationTriggerDetails {}
unsafe impl Sync for PhoneIncomingCallNotificationTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PhoneLineChangeKind(pub i32);
impl PhoneLineChangeKind {
pub const Added: Self = Self(0i32);
pub const Removed: Self = Self(1i32);
pub const PropertiesChanged: Self = Self(2i32);
}
impl windows_core::TypeKind for PhoneLineChangeKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PhoneLineChangeKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Calls.Background.PhoneLineChangeKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PhoneLineChangedTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PhoneLineChangedTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PhoneLineChangedTriggerDetails {
pub fn LineId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LineId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ChangeType(&self) -> windows_core::Result<PhoneLineChangeKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChangeType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn HasLinePropertyChanged(&self, lineproperty: PhoneLineProperties) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HasLinePropertyChanged)(windows_core::Interface::as_raw(this), lineproperty, &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PhoneLineChangedTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPhoneLineChangedTriggerDetails>();
}
unsafe impl windows_core::Interface for PhoneLineChangedTriggerDetails {
type Vtable = <IPhoneLineChangedTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPhoneLineChangedTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PhoneLineChangedTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Background.PhoneLineChangedTriggerDetails";
}
unsafe impl Send for PhoneLineChangedTriggerDetails {}
unsafe impl Sync for PhoneLineChangedTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PhoneLineProperties(pub u32);
impl PhoneLineProperties {
pub const None: Self = Self(0u32);
pub const BrandingOptions: Self = Self(1u32);
pub const CanDial: Self = Self(2u32);
pub const CellularDetails: Self = Self(4u32);
pub const DisplayColor: Self = Self(8u32);
pub const DisplayName: Self = Self(16u32);
pub const NetworkName: Self = Self(32u32);
pub const NetworkState: Self = Self(64u32);
pub const Transport: Self = Self(128u32);
pub const Voicemail: Self = Self(256u32);
}
impl windows_core::TypeKind for PhoneLineProperties {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PhoneLineProperties {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Calls.Background.PhoneLineProperties;u4)");
}
impl PhoneLineProperties {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for PhoneLineProperties {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for PhoneLineProperties {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for PhoneLineProperties {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for PhoneLineProperties {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for PhoneLineProperties {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PhoneNewVoicemailMessageTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PhoneNewVoicemailMessageTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PhoneNewVoicemailMessageTriggerDetails {
pub fn LineId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LineId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn VoicemailCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).VoicemailCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn OperatorMessage(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OperatorMessage)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for PhoneNewVoicemailMessageTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPhoneNewVoicemailMessageTriggerDetails>();
}
unsafe impl windows_core::Interface for PhoneNewVoicemailMessageTriggerDetails {
type Vtable = <IPhoneNewVoicemailMessageTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPhoneNewVoicemailMessageTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PhoneNewVoicemailMessageTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Background.PhoneNewVoicemailMessageTriggerDetails";
}
unsafe impl Send for PhoneNewVoicemailMessageTriggerDetails {}
unsafe impl Sync for PhoneNewVoicemailMessageTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PhoneTriggerType(pub i32);
impl PhoneTriggerType {
pub const NewVoicemailMessage: Self = Self(0i32);
pub const CallHistoryChanged: Self = Self(1i32);
pub const LineChanged: Self = Self(2i32);
pub const AirplaneModeDisabledForEmergencyCall: Self = Self(3i32);
pub const CallOriginDataRequest: Self = Self(4i32);
pub const CallBlocked: Self = Self(5i32);
pub const IncomingCallDismissed: Self = Self(6i32);
pub const IncomingCallNotification: Self = Self(7i32);
}
impl windows_core::TypeKind for PhoneTriggerType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PhoneTriggerType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Calls.Background.PhoneTriggerType;i4)");
}
@@ -0,0 +1,205 @@
windows_core::imp::define_interface!(IPhoneCallOrigin, IPhoneCallOrigin_Vtbl, 0x20613479_0ef9_4454_871c_afb66a14b6a5);
impl windows_core::RuntimeType for IPhoneCallOrigin {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallOrigin_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Category: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCategory: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CategoryDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCategoryDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Location: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetLocation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneCallOrigin2, IPhoneCallOrigin2_Vtbl, 0x04c7e980_9ac2_4768_b536_b68da4957d02);
impl windows_core::RuntimeType for IPhoneCallOrigin2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallOrigin2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneCallOrigin3, IPhoneCallOrigin3_Vtbl, 0x49330fb4_d1a7_43a2_aeee_c07b6dbaf068);
impl windows_core::RuntimeType for IPhoneCallOrigin3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallOrigin3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Streams")]
pub DisplayPicture: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
DisplayPicture: usize,
#[cfg(feature = "Storage_Streams")]
pub SetDisplayPicture: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SetDisplayPicture: usize,
}
windows_core::imp::define_interface!(IPhoneCallOriginManagerStatics, IPhoneCallOriginManagerStatics_Vtbl, 0xccfc5a0a_9af7_6149_39d0_e076fcce1395);
impl windows_core::RuntimeType for IPhoneCallOriginManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallOriginManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsCurrentAppActiveCallOriginApp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ShowPhoneCallOriginSettingsUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCallOrigin: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneCallOriginManagerStatics2, IPhoneCallOriginManagerStatics2_Vtbl, 0x8bf3ee3f_40f4_4380_8c7c_aea2c9b8dd7a);
impl windows_core::RuntimeType for IPhoneCallOriginManagerStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallOriginManagerStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestSetAsActiveCallOriginAppAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPhoneCallOriginManagerStatics3, IPhoneCallOriginManagerStatics3_Vtbl, 0x2ed69764_a6e3_50f0_b76a_d67cb39bdfde);
impl windows_core::RuntimeType for IPhoneCallOriginManagerStatics3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPhoneCallOriginManagerStatics3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PhoneCallOrigin(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PhoneCallOrigin, windows_core::IUnknown, windows_core::IInspectable);
impl PhoneCallOrigin {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PhoneCallOrigin, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Category(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Category)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetCategory(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetCategory)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn CategoryDescription(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CategoryDescription)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetCategoryDescription(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetCategoryDescription)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn Location(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Location)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetLocation(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetLocation)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IPhoneCallOrigin2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDisplayName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IPhoneCallOrigin2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetDisplayName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn DisplayPicture(&self) -> windows_core::Result<super::super::super::Storage::StorageFile> {
let this = &windows_core::Interface::cast::<IPhoneCallOrigin3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayPicture)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn SetDisplayPicture<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Storage::StorageFile>,
{
let this = &windows_core::Interface::cast::<IPhoneCallOrigin3>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetDisplayPicture)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
}
impl windows_core::RuntimeType for PhoneCallOrigin {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPhoneCallOrigin>();
}
unsafe impl windows_core::Interface for PhoneCallOrigin {
type Vtable = <IPhoneCallOrigin as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPhoneCallOrigin as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PhoneCallOrigin {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Provider.PhoneCallOrigin";
}
unsafe impl Send for PhoneCallOrigin {}
unsafe impl Sync for PhoneCallOrigin {}
pub struct PhoneCallOriginManager;
impl PhoneCallOriginManager {
pub fn IsCurrentAppActiveCallOriginApp() -> windows_core::Result<bool> {
Self::IPhoneCallOriginManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsCurrentAppActiveCallOriginApp)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn ShowPhoneCallOriginSettingsUI() -> windows_core::Result<()> {
Self::IPhoneCallOriginManagerStatics(|this| unsafe { (windows_core::Interface::vtable(this).ShowPhoneCallOriginSettingsUI)(windows_core::Interface::as_raw(this)).ok() })
}
pub fn SetCallOrigin<P1>(requestid: windows_core::GUID, callorigin: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<PhoneCallOrigin>,
{
Self::IPhoneCallOriginManagerStatics(|this| unsafe { (windows_core::Interface::vtable(this).SetCallOrigin)(windows_core::Interface::as_raw(this), requestid, callorigin.param().abi()).ok() })
}
pub fn RequestSetAsActiveCallOriginAppAsync() -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
Self::IPhoneCallOriginManagerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestSetAsActiveCallOriginAppAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn IsSupported() -> windows_core::Result<bool> {
Self::IPhoneCallOriginManagerStatics3(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsSupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
fn IPhoneCallOriginManagerStatics<R, F: FnOnce(&IPhoneCallOriginManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PhoneCallOriginManager, IPhoneCallOriginManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IPhoneCallOriginManagerStatics2<R, F: FnOnce(&IPhoneCallOriginManagerStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PhoneCallOriginManager, IPhoneCallOriginManagerStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IPhoneCallOriginManagerStatics3<R, F: FnOnce(&IPhoneCallOriginManagerStatics3) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PhoneCallOriginManager, IPhoneCallOriginManagerStatics3> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for PhoneCallOriginManager {
const NAME: &'static str = "Windows.ApplicationModel.Calls.Provider.PhoneCallOriginManager";
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,111 @@
pub struct CommunicationBlockingAccessManager;
impl CommunicationBlockingAccessManager {
pub fn IsBlockingActive() -> windows_core::Result<bool> {
Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsBlockingActive)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn IsBlockedNumberAsync(number: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsBlockedNumberAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(number), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ShowBlockNumbersUI<P0>(phonenumbers: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowBlockNumbersUI)(windows_core::Interface::as_raw(this), phonenumbers.param().abi(), &mut result__).map(|| result__)
})
}
pub fn ShowUnblockNumbersUI<P0>(phonenumbers: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowUnblockNumbersUI)(windows_core::Interface::as_raw(this), phonenumbers.param().abi(), &mut result__).map(|| result__)
})
}
pub fn ShowBlockedCallsUI() -> windows_core::Result<()> {
Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe { (windows_core::Interface::vtable(this).ShowBlockedCallsUI)(windows_core::Interface::as_raw(this)).ok() })
}
pub fn ShowBlockedMessagesUI() -> windows_core::Result<()> {
Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe { (windows_core::Interface::vtable(this).ShowBlockedMessagesUI)(windows_core::Interface::as_raw(this)).ok() })
}
fn ICommunicationBlockingAccessManagerStatics<R, F: FnOnce(&ICommunicationBlockingAccessManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<CommunicationBlockingAccessManager, ICommunicationBlockingAccessManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for CommunicationBlockingAccessManager {
const NAME: &'static str = "Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingAccessManager";
}
pub struct CommunicationBlockingAppManager;
impl CommunicationBlockingAppManager {
pub fn IsCurrentAppActiveBlockingApp() -> windows_core::Result<bool> {
Self::ICommunicationBlockingAppManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsCurrentAppActiveBlockingApp)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn ShowCommunicationBlockingSettingsUI() -> windows_core::Result<()> {
Self::ICommunicationBlockingAppManagerStatics(|this| unsafe { (windows_core::Interface::vtable(this).ShowCommunicationBlockingSettingsUI)(windows_core::Interface::as_raw(this)).ok() })
}
pub fn RequestSetAsActiveBlockingAppAsync() -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
Self::ICommunicationBlockingAppManagerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestSetAsActiveBlockingAppAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn ICommunicationBlockingAppManagerStatics<R, F: FnOnce(&ICommunicationBlockingAppManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<CommunicationBlockingAppManager, ICommunicationBlockingAppManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn ICommunicationBlockingAppManagerStatics2<R, F: FnOnce(&ICommunicationBlockingAppManagerStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<CommunicationBlockingAppManager, ICommunicationBlockingAppManagerStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for CommunicationBlockingAppManager {
const NAME: &'static str = "Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingAppManager";
}
windows_core::imp::define_interface!(ICommunicationBlockingAccessManagerStatics, ICommunicationBlockingAccessManagerStatics_Vtbl, 0x1c969998_9d2a_5db7_edd5_0ce407fc2595);
impl windows_core::RuntimeType for ICommunicationBlockingAccessManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICommunicationBlockingAccessManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsBlockingActive: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsBlockedNumberAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ShowBlockNumbersUI: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ShowUnblockNumbersUI: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ShowBlockedCallsUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ShowBlockedMessagesUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICommunicationBlockingAppManagerStatics, ICommunicationBlockingAppManagerStatics_Vtbl, 0x77db58ec_14a6_4baa_942a_6a673d999bf2);
impl windows_core::RuntimeType for ICommunicationBlockingAppManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICommunicationBlockingAppManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsCurrentAppActiveBlockingApp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ShowCommunicationBlockingSettingsUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICommunicationBlockingAppManagerStatics2, ICommunicationBlockingAppManagerStatics2_Vtbl, 0x14a68edd_ed88_457a_a364_a3634d6f166d);
impl windows_core::RuntimeType for ICommunicationBlockingAppManagerStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICommunicationBlockingAppManagerStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestSetAsActiveBlockingAppAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,570 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactDataProviderConnection(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactDataProviderConnection, windows_core::IUnknown, windows_core::IInspectable);
impl ContactDataProviderConnection {
pub fn SyncRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<ContactDataProviderConnection, ContactListSyncManagerSyncRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SyncRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveSyncRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveSyncRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn ServerSearchReadBatchRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<ContactDataProviderConnection, ContactListServerSearchReadBatchRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ServerSearchReadBatchRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveServerSearchReadBatchRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveServerSearchReadBatchRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn CreateOrUpdateContactRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<ContactDataProviderConnection, ContactListCreateOrUpdateContactRequestEventArgs>>,
{
let this = &windows_core::Interface::cast::<IContactDataProviderConnection2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateOrUpdateContactRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveCreateOrUpdateContactRequested(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IContactDataProviderConnection2>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemoveCreateOrUpdateContactRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn DeleteContactRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<ContactDataProviderConnection, ContactListDeleteContactRequestEventArgs>>,
{
let this = &windows_core::Interface::cast::<IContactDataProviderConnection2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteContactRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveDeleteContactRequested(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IContactDataProviderConnection2>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemoveDeleteContactRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
}
impl windows_core::RuntimeType for ContactDataProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactDataProviderConnection>();
}
unsafe impl windows_core::Interface for ContactDataProviderConnection {
type Vtable = <IContactDataProviderConnection as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactDataProviderConnection as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactDataProviderConnection {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactDataProviderConnection";
}
unsafe impl Send for ContactDataProviderConnection {}
unsafe impl Sync for ContactDataProviderConnection {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactDataProviderTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactDataProviderTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl ContactDataProviderTriggerDetails {
pub fn Connection(&self) -> windows_core::Result<ContactDataProviderConnection> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Connection)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactDataProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactDataProviderTriggerDetails>();
}
unsafe impl windows_core::Interface for ContactDataProviderTriggerDetails {
type Vtable = <IContactDataProviderTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactDataProviderTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactDataProviderTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactDataProviderTriggerDetails";
}
unsafe impl Send for ContactDataProviderTriggerDetails {}
unsafe impl Sync for ContactDataProviderTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListCreateOrUpdateContactRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListCreateOrUpdateContactRequest, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListCreateOrUpdateContactRequest {
pub fn ContactListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContactListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Contact(&self) -> windows_core::Result<super::Contact> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Contact)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportCompletedAsync<P0>(&self, createdorupdatedcontact: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::Contact>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), createdorupdatedcontact.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListCreateOrUpdateContactRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListCreateOrUpdateContactRequest>();
}
unsafe impl windows_core::Interface for ContactListCreateOrUpdateContactRequest {
type Vtable = <IContactListCreateOrUpdateContactRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListCreateOrUpdateContactRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListCreateOrUpdateContactRequest {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListCreateOrUpdateContactRequest";
}
unsafe impl Send for ContactListCreateOrUpdateContactRequest {}
unsafe impl Sync for ContactListCreateOrUpdateContactRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListCreateOrUpdateContactRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListCreateOrUpdateContactRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListCreateOrUpdateContactRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<ContactListCreateOrUpdateContactRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListCreateOrUpdateContactRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListCreateOrUpdateContactRequestEventArgs>();
}
unsafe impl windows_core::Interface for ContactListCreateOrUpdateContactRequestEventArgs {
type Vtable = <IContactListCreateOrUpdateContactRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListCreateOrUpdateContactRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListCreateOrUpdateContactRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListCreateOrUpdateContactRequestEventArgs";
}
unsafe impl Send for ContactListCreateOrUpdateContactRequestEventArgs {}
unsafe impl Sync for ContactListCreateOrUpdateContactRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListDeleteContactRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListDeleteContactRequest, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListDeleteContactRequest {
pub fn ContactListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContactListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ContactId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContactId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListDeleteContactRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListDeleteContactRequest>();
}
unsafe impl windows_core::Interface for ContactListDeleteContactRequest {
type Vtable = <IContactListDeleteContactRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListDeleteContactRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListDeleteContactRequest {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListDeleteContactRequest";
}
unsafe impl Send for ContactListDeleteContactRequest {}
unsafe impl Sync for ContactListDeleteContactRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListDeleteContactRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListDeleteContactRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListDeleteContactRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<ContactListDeleteContactRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListDeleteContactRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListDeleteContactRequestEventArgs>();
}
unsafe impl windows_core::Interface for ContactListDeleteContactRequestEventArgs {
type Vtable = <IContactListDeleteContactRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListDeleteContactRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListDeleteContactRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListDeleteContactRequestEventArgs";
}
unsafe impl Send for ContactListDeleteContactRequestEventArgs {}
unsafe impl Sync for ContactListDeleteContactRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListServerSearchReadBatchRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListServerSearchReadBatchRequest, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListServerSearchReadBatchRequest {
pub fn SessionId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SessionId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ContactListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContactListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Options(&self) -> windows_core::Result<super::ContactQueryOptions> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Options)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SuggestedBatchSize(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SuggestedBatchSize)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SaveContactAsync<P0>(&self, contact: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::Contact>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SaveContactAsync)(windows_core::Interface::as_raw(this), contact.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self, batchstatus: super::ContactBatchStatus) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), batchstatus, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListServerSearchReadBatchRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListServerSearchReadBatchRequest>();
}
unsafe impl windows_core::Interface for ContactListServerSearchReadBatchRequest {
type Vtable = <IContactListServerSearchReadBatchRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListServerSearchReadBatchRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListServerSearchReadBatchRequest {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListServerSearchReadBatchRequest";
}
unsafe impl Send for ContactListServerSearchReadBatchRequest {}
unsafe impl Sync for ContactListServerSearchReadBatchRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListServerSearchReadBatchRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListServerSearchReadBatchRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListServerSearchReadBatchRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<ContactListServerSearchReadBatchRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListServerSearchReadBatchRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListServerSearchReadBatchRequestEventArgs>();
}
unsafe impl windows_core::Interface for ContactListServerSearchReadBatchRequestEventArgs {
type Vtable = <IContactListServerSearchReadBatchRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListServerSearchReadBatchRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListServerSearchReadBatchRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListServerSearchReadBatchRequestEventArgs";
}
unsafe impl Send for ContactListServerSearchReadBatchRequestEventArgs {}
unsafe impl Sync for ContactListServerSearchReadBatchRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListSyncManagerSyncRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListSyncManagerSyncRequest, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListSyncManagerSyncRequest {
pub fn ContactListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContactListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListSyncManagerSyncRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListSyncManagerSyncRequest>();
}
unsafe impl windows_core::Interface for ContactListSyncManagerSyncRequest {
type Vtable = <IContactListSyncManagerSyncRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListSyncManagerSyncRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListSyncManagerSyncRequest {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListSyncManagerSyncRequest";
}
unsafe impl Send for ContactListSyncManagerSyncRequest {}
unsafe impl Sync for ContactListSyncManagerSyncRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactListSyncManagerSyncRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactListSyncManagerSyncRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl ContactListSyncManagerSyncRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<ContactListSyncManagerSyncRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactListSyncManagerSyncRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactListSyncManagerSyncRequestEventArgs>();
}
unsafe impl windows_core::Interface for ContactListSyncManagerSyncRequestEventArgs {
type Vtable = <IContactListSyncManagerSyncRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactListSyncManagerSyncRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactListSyncManagerSyncRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.DataProvider.ContactListSyncManagerSyncRequestEventArgs";
}
unsafe impl Send for ContactListSyncManagerSyncRequestEventArgs {}
unsafe impl Sync for ContactListSyncManagerSyncRequestEventArgs {}
windows_core::imp::define_interface!(IContactDataProviderConnection, IContactDataProviderConnection_Vtbl, 0x1a398a52_8c9d_4d6f_a4e0_111e9a125a30);
impl windows_core::RuntimeType for IContactDataProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactDataProviderConnection_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SyncRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveSyncRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub ServerSearchReadBatchRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveServerSearchReadBatchRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactDataProviderConnection2, IContactDataProviderConnection2_Vtbl, 0xa1d327b0_196c_4bfd_8f0f_c68d67f249d3);
impl windows_core::RuntimeType for IContactDataProviderConnection2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactDataProviderConnection2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateOrUpdateContactRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveCreateOrUpdateContactRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub DeleteContactRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveDeleteContactRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactDataProviderTriggerDetails, IContactDataProviderTriggerDetails_Vtbl, 0x527104be_3c62_43c8_9ae7_db531685cd99);
impl windows_core::RuntimeType for IContactDataProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactDataProviderTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Connection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListCreateOrUpdateContactRequest, IContactListCreateOrUpdateContactRequest_Vtbl, 0xb4af411f_c849_47d0_b119_91cf605b2f2a);
impl windows_core::RuntimeType for IContactListCreateOrUpdateContactRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListCreateOrUpdateContactRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ContactListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Contact: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListCreateOrUpdateContactRequestEventArgs, IContactListCreateOrUpdateContactRequestEventArgs_Vtbl, 0x851c1690_1a51_4b0c_aeef_1240ac5bed75);
impl windows_core::RuntimeType for IContactListCreateOrUpdateContactRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListCreateOrUpdateContactRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListDeleteContactRequest, IContactListDeleteContactRequest_Vtbl, 0x5e114687_ce03_4de5_8557_9ccf552d472a);
impl windows_core::RuntimeType for IContactListDeleteContactRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListDeleteContactRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ContactListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ContactId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListDeleteContactRequestEventArgs, IContactListDeleteContactRequestEventArgs_Vtbl, 0xb22054a1_e8fa_4db5_9389_2d12ee7d15ee);
impl windows_core::RuntimeType for IContactListDeleteContactRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListDeleteContactRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListServerSearchReadBatchRequest, IContactListServerSearchReadBatchRequest_Vtbl, 0xba776a97_4030_4925_9fb4_143b295e653b);
impl windows_core::RuntimeType for IContactListServerSearchReadBatchRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListServerSearchReadBatchRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SessionId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ContactListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Options: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SuggestedBatchSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SaveContactAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, super::ContactBatchStatus, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListServerSearchReadBatchRequestEventArgs, IContactListServerSearchReadBatchRequestEventArgs_Vtbl, 0x1a27e87b_69d7_4e4e_8042_861cba61471e);
impl windows_core::RuntimeType for IContactListServerSearchReadBatchRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListServerSearchReadBatchRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListSyncManagerSyncRequest, IContactListSyncManagerSyncRequest_Vtbl, 0x3c0e57a4_c4e7_4970_9a8f_9a66a2bb6c1a);
impl windows_core::RuntimeType for IContactListSyncManagerSyncRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListSyncManagerSyncRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ContactListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactListSyncManagerSyncRequestEventArgs, IContactListSyncManagerSyncRequestEventArgs_Vtbl, 0x158e4dac_446d_4f10_afc2_02683ec533a6);
impl windows_core::RuntimeType for IContactListSyncManagerSyncRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactListSyncManagerSyncRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,156 @@
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AddContactResult(pub i32);
impl AddContactResult {
pub const Added: Self = Self(0i32);
pub const AlreadyAdded: Self = Self(1i32);
pub const Unavailable: Self = Self(2i32);
}
impl windows_core::TypeKind for AddContactResult {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for AddContactResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Contacts.Provider.AddContactResult;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactPickerUI(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactPickerUI, windows_core::IUnknown, windows_core::IInspectable);
impl ContactPickerUI {
pub fn AddContact<P1>(&self, id: &windows_core::HSTRING, contact: P1) -> windows_core::Result<AddContactResult>
where
P1: windows_core::Param<super::Contact>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddContact)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), contact.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveContact(&self, id: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveContact)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id)).ok() }
}
pub fn ContainsContact(&self, id: &windows_core::HSTRING) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContainsContact)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), &mut result__).map(|| result__)
}
}
pub fn DesiredFields(&self) -> windows_core::Result<windows_collections::IVectorView<windows_core::HSTRING>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DesiredFields)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SelectionMode(&self) -> windows_core::Result<super::ContactSelectionMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SelectionMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ContactRemoved<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<ContactPickerUI, ContactRemovedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContactRemoved)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveContactRemoved(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveContactRemoved)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn AddContact2<P0>(&self, contact: P0) -> windows_core::Result<AddContactResult>
where
P0: windows_core::Param<super::Contact>,
{
let this = &windows_core::Interface::cast::<IContactPickerUI2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddContact)(windows_core::Interface::as_raw(this), contact.param().abi(), &mut result__).map(|| result__)
}
}
pub fn DesiredFieldsWithContactFieldType(&self) -> windows_core::Result<windows_collections::IVector<super::ContactFieldType>> {
let this = &windows_core::Interface::cast::<IContactPickerUI2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DesiredFieldsWithContactFieldType)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ContactPickerUI {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactPickerUI>();
}
unsafe impl windows_core::Interface for ContactPickerUI {
type Vtable = <IContactPickerUI as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactPickerUI as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactPickerUI {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.Provider.ContactPickerUI";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ContactRemovedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ContactRemovedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl ContactRemovedEventArgs {
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for ContactRemovedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IContactRemovedEventArgs>();
}
unsafe impl windows_core::Interface for ContactRemovedEventArgs {
type Vtable = <IContactRemovedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IContactRemovedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ContactRemovedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Contacts.Provider.ContactRemovedEventArgs";
}
windows_core::imp::define_interface!(IContactPickerUI, IContactPickerUI_Vtbl, 0xe2cc1366_cf66_43c4_a96a_a5a112db4746);
impl windows_core::RuntimeType for IContactPickerUI {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactPickerUI_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AddContact: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut AddContactResult) -> windows_core::HRESULT,
pub RemoveContact: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ContainsContact: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub DesiredFields: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SelectionMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::ContactSelectionMode) -> windows_core::HRESULT,
pub ContactRemoved: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveContactRemoved: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactPickerUI2, IContactPickerUI2_Vtbl, 0x6e449e28_7b25_4999_9b0b_875400a1e8c8);
impl windows_core::RuntimeType for IContactPickerUI2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactPickerUI2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AddContact: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut AddContactResult) -> windows_core::HRESULT,
pub DesiredFieldsWithContactFieldType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IContactRemovedEventArgs, IContactRemovedEventArgs_Vtbl, 0x6f354338_3302_4d13_ad8d_adcc0ff9e47c);
impl windows_core::RuntimeType for IContactRemovedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IContactRemovedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,580 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CoreDragDropManager(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(CoreDragDropManager, windows_core::IUnknown, windows_core::IInspectable);
impl CoreDragDropManager {
pub fn TargetRequested<P0>(&self, value: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::super::Foundation::TypedEventHandler<CoreDragDropManager, CoreDropOperationTargetRequestedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TargetRequested)(windows_core::Interface::as_raw(this), value.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveTargetRequested(&self, value: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveTargetRequested)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn AreConcurrentOperationsEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AreConcurrentOperationsEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetAreConcurrentOperationsEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAreConcurrentOperationsEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn GetForCurrentView() -> windows_core::Result<CoreDragDropManager> {
Self::ICoreDragDropManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn ICoreDragDropManagerStatics<R, F: FnOnce(&ICoreDragDropManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<CoreDragDropManager, ICoreDragDropManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for CoreDragDropManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ICoreDragDropManager>();
}
unsafe impl windows_core::Interface for CoreDragDropManager {
type Vtable = <ICoreDragDropManager as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ICoreDragDropManager as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for CoreDragDropManager {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager";
}
unsafe impl Send for CoreDragDropManager {}
unsafe impl Sync for CoreDragDropManager {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CoreDragInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(CoreDragInfo, windows_core::IUnknown, windows_core::IInspectable);
impl CoreDragInfo {
pub fn Data(&self) -> windows_core::Result<super::super::DataPackageView> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Data)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Modifiers(&self) -> windows_core::Result<super::DragDropModifiers> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Modifiers)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Position(&self) -> windows_core::Result<super::super::super::super::Foundation::Point> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Position)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn AllowedOperations(&self) -> windows_core::Result<super::super::DataPackageOperation> {
let this = &windows_core::Interface::cast::<ICoreDragInfo2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AllowedOperations)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for CoreDragInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ICoreDragInfo>();
}
unsafe impl windows_core::Interface for CoreDragInfo {
type Vtable = <ICoreDragInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ICoreDragInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for CoreDragInfo {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo";
}
unsafe impl Send for CoreDragInfo {}
unsafe impl Sync for CoreDragInfo {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CoreDragOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(CoreDragOperation, windows_core::IUnknown, windows_core::IInspectable);
impl CoreDragOperation {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<CoreDragOperation, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Data(&self) -> windows_core::Result<super::super::DataPackage> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Data)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetPointerId(&self, pointerid: u32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPointerId)(windows_core::Interface::as_raw(this), pointerid).ok() }
}
#[cfg(feature = "Graphics_Imaging")]
pub fn SetDragUIContentFromSoftwareBitmap<P0>(&self, softwarebitmap: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::super::Graphics::Imaging::SoftwareBitmap>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDragUIContentFromSoftwareBitmap)(windows_core::Interface::as_raw(this), softwarebitmap.param().abi()).ok() }
}
#[cfg(feature = "Graphics_Imaging")]
pub fn SetDragUIContentFromSoftwareBitmapWithAnchorPoint<P0>(&self, softwarebitmap: P0, anchorpoint: super::super::super::super::Foundation::Point) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::super::Graphics::Imaging::SoftwareBitmap>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDragUIContentFromSoftwareBitmapWithAnchorPoint)(windows_core::Interface::as_raw(this), softwarebitmap.param().abi(), anchorpoint).ok() }
}
pub fn DragUIContentMode(&self) -> windows_core::Result<CoreDragUIContentMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DragUIContentMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDragUIContentMode(&self, value: CoreDragUIContentMode) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDragUIContentMode)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn StartAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::DataPackageOperation>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AllowedOperations(&self) -> windows_core::Result<super::super::DataPackageOperation> {
let this = &windows_core::Interface::cast::<ICoreDragOperation2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AllowedOperations)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetAllowedOperations(&self, value: super::super::DataPackageOperation) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<ICoreDragOperation2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAllowedOperations)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for CoreDragOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ICoreDragOperation>();
}
unsafe impl windows_core::Interface for CoreDragOperation {
type Vtable = <ICoreDragOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ICoreDragOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for CoreDragOperation {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragOperation";
}
unsafe impl Send for CoreDragOperation {}
unsafe impl Sync for CoreDragOperation {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct CoreDragUIContentMode(pub u32);
impl CoreDragUIContentMode {
pub const Auto: Self = Self(0u32);
pub const Deferred: Self = Self(1u32);
}
impl windows_core::TypeKind for CoreDragUIContentMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for CoreDragUIContentMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIContentMode;u4)");
}
impl CoreDragUIContentMode {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for CoreDragUIContentMode {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for CoreDragUIContentMode {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for CoreDragUIContentMode {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for CoreDragUIContentMode {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for CoreDragUIContentMode {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CoreDragUIOverride(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(CoreDragUIOverride, windows_core::IUnknown, windows_core::IInspectable);
impl CoreDragUIOverride {
#[cfg(feature = "Graphics_Imaging")]
pub fn SetContentFromSoftwareBitmap<P0>(&self, softwarebitmap: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::super::Graphics::Imaging::SoftwareBitmap>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContentFromSoftwareBitmap)(windows_core::Interface::as_raw(this), softwarebitmap.param().abi()).ok() }
}
#[cfg(feature = "Graphics_Imaging")]
pub fn SetContentFromSoftwareBitmapWithAnchorPoint<P0>(&self, softwarebitmap: P0, anchorpoint: super::super::super::super::Foundation::Point) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::super::Graphics::Imaging::SoftwareBitmap>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContentFromSoftwareBitmapWithAnchorPoint)(windows_core::Interface::as_raw(this), softwarebitmap.param().abi(), anchorpoint).ok() }
}
pub fn IsContentVisible(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsContentVisible)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsContentVisible(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIsContentVisible)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Caption(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Caption)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetCaption(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetCaption)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn IsCaptionVisible(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsCaptionVisible)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsCaptionVisible(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIsCaptionVisible)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsGlyphVisible(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsGlyphVisible)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsGlyphVisible(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIsGlyphVisible)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Clear(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Clear)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for CoreDragUIOverride {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ICoreDragUIOverride>();
}
unsafe impl windows_core::Interface for CoreDragUIOverride {
type Vtable = <ICoreDragUIOverride as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ICoreDragUIOverride as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for CoreDragUIOverride {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride";
}
unsafe impl Send for CoreDragUIOverride {}
unsafe impl Sync for CoreDragUIOverride {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CoreDropOperationTargetRequestedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(CoreDropOperationTargetRequestedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl CoreDropOperationTargetRequestedEventArgs {
pub fn SetTarget<P0>(&self, target: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<ICoreDropOperationTarget>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetTarget)(windows_core::Interface::as_raw(this), target.param().abi()).ok() }
}
}
impl windows_core::RuntimeType for CoreDropOperationTargetRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ICoreDropOperationTargetRequestedEventArgs>();
}
unsafe impl windows_core::Interface for CoreDropOperationTargetRequestedEventArgs {
type Vtable = <ICoreDropOperationTargetRequestedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ICoreDropOperationTargetRequestedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for CoreDropOperationTargetRequestedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDropOperationTargetRequestedEventArgs";
}
unsafe impl Send for CoreDropOperationTargetRequestedEventArgs {}
unsafe impl Sync for CoreDropOperationTargetRequestedEventArgs {}
windows_core::imp::define_interface!(ICoreDragDropManager, ICoreDragDropManager_Vtbl, 0x7d56d344_8464_4faf_aa49_37ea6e2d7bd1);
impl windows_core::RuntimeType for ICoreDragDropManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDragDropManager_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TargetRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveTargetRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub AreConcurrentOperationsEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetAreConcurrentOperationsEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDragDropManagerStatics, ICoreDragDropManagerStatics_Vtbl, 0x9542fdca_da12_4c1c_8d06_041db29733c3);
impl windows_core::RuntimeType for ICoreDragDropManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDragDropManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDragInfo, ICoreDragInfo_Vtbl, 0x48353a8b_cb50_464e_9575_cd4e3a7ab028);
impl windows_core::RuntimeType for ICoreDragInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDragInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Data: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Modifiers: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::DragDropModifiers) -> windows_core::HRESULT,
pub Position: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::super::Foundation::Point) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDragInfo2, ICoreDragInfo2_Vtbl, 0xc54691e5_e6fb_4d74_b4b1_8a3c17f25e9e);
impl windows_core::RuntimeType for ICoreDragInfo2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDragInfo2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AllowedOperations: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::DataPackageOperation) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDragOperation, ICoreDragOperation_Vtbl, 0xcc06de4f_6db0_4e62_ab1b_a74a02dc6d85);
impl windows_core::RuntimeType for ICoreDragOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDragOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Data: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPointerId: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
#[cfg(feature = "Graphics_Imaging")]
pub SetDragUIContentFromSoftwareBitmap: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics_Imaging"))]
SetDragUIContentFromSoftwareBitmap: usize,
#[cfg(feature = "Graphics_Imaging")]
pub SetDragUIContentFromSoftwareBitmapWithAnchorPoint: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::super::super::Foundation::Point) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics_Imaging"))]
SetDragUIContentFromSoftwareBitmapWithAnchorPoint: usize,
pub DragUIContentMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut CoreDragUIContentMode) -> windows_core::HRESULT,
pub SetDragUIContentMode: unsafe extern "system" fn(*mut core::ffi::c_void, CoreDragUIContentMode) -> windows_core::HRESULT,
pub StartAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDragOperation2, ICoreDragOperation2_Vtbl, 0x824b1e2c_d99a_4fc3_8507_6c182f33b46a);
impl windows_core::RuntimeType for ICoreDragOperation2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDragOperation2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AllowedOperations: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::DataPackageOperation) -> windows_core::HRESULT,
pub SetAllowedOperations: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::DataPackageOperation) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDragUIOverride, ICoreDragUIOverride_Vtbl, 0x89a85064_3389_4f4f_8897_7e8a3ffb3c93);
impl windows_core::RuntimeType for ICoreDragUIOverride {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDragUIOverride_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Graphics_Imaging")]
pub SetContentFromSoftwareBitmap: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics_Imaging"))]
SetContentFromSoftwareBitmap: usize,
#[cfg(feature = "Graphics_Imaging")]
pub SetContentFromSoftwareBitmapWithAnchorPoint: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::super::super::Foundation::Point) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics_Imaging"))]
SetContentFromSoftwareBitmapWithAnchorPoint: usize,
pub IsContentVisible: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsContentVisible: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub Caption: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCaption: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsCaptionVisible: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsCaptionVisible: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsGlyphVisible: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsGlyphVisible: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDropOperationTarget, ICoreDropOperationTarget_Vtbl, 0xd9126196_4c5b_417d_bb37_76381def8db4);
impl windows_core::RuntimeType for ICoreDropOperationTarget {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(ICoreDropOperationTarget, windows_core::IUnknown, windows_core::IInspectable);
impl ICoreDropOperationTarget {
pub fn EnterAsync<P0, P1>(&self, draginfo: P0, draguioverride: P1) -> windows_core::Result<windows_future::IAsyncOperation<super::super::DataPackageOperation>>
where
P0: windows_core::Param<CoreDragInfo>,
P1: windows_core::Param<CoreDragUIOverride>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EnterAsync)(windows_core::Interface::as_raw(this), draginfo.param().abi(), draguioverride.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn OverAsync<P0, P1>(&self, draginfo: P0, draguioverride: P1) -> windows_core::Result<windows_future::IAsyncOperation<super::super::DataPackageOperation>>
where
P0: windows_core::Param<CoreDragInfo>,
P1: windows_core::Param<CoreDragUIOverride>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OverAsync)(windows_core::Interface::as_raw(this), draginfo.param().abi(), draguioverride.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn LeaveAsync<P0>(&self, draginfo: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<CoreDragInfo>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LeaveAsync)(windows_core::Interface::as_raw(this), draginfo.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DropAsync<P0>(&self, draginfo: P0) -> windows_core::Result<windows_future::IAsyncOperation<super::super::DataPackageOperation>>
where
P0: windows_core::Param<CoreDragInfo>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DropAsync)(windows_core::Interface::as_raw(this), draginfo.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for ICoreDropOperationTarget {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTarget";
}
pub trait ICoreDropOperationTarget_Impl: windows_core::IUnknownImpl {
fn EnterAsync(&self, dragInfo: windows_core::Ref<CoreDragInfo>, dragUIOverride: windows_core::Ref<CoreDragUIOverride>) -> windows_core::Result<windows_future::IAsyncOperation<super::super::DataPackageOperation>>;
fn OverAsync(&self, dragInfo: windows_core::Ref<CoreDragInfo>, dragUIOverride: windows_core::Ref<CoreDragUIOverride>) -> windows_core::Result<windows_future::IAsyncOperation<super::super::DataPackageOperation>>;
fn LeaveAsync(&self, dragInfo: windows_core::Ref<CoreDragInfo>) -> windows_core::Result<windows_future::IAsyncAction>;
fn DropAsync(&self, dragInfo: windows_core::Ref<CoreDragInfo>) -> windows_core::Result<windows_future::IAsyncOperation<super::super::DataPackageOperation>>;
}
impl ICoreDropOperationTarget_Vtbl {
pub const fn new<Identity: ICoreDropOperationTarget_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn EnterAsync<Identity: ICoreDropOperationTarget_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, draguioverride: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ICoreDropOperationTarget_Impl::EnterAsync(this, core::mem::transmute_copy(&draginfo), core::mem::transmute_copy(&draguioverride)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn OverAsync<Identity: ICoreDropOperationTarget_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, draguioverride: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ICoreDropOperationTarget_Impl::OverAsync(this, core::mem::transmute_copy(&draginfo), core::mem::transmute_copy(&draguioverride)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn LeaveAsync<Identity: ICoreDropOperationTarget_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ICoreDropOperationTarget_Impl::LeaveAsync(this, core::mem::transmute_copy(&draginfo)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DropAsync<Identity: ICoreDropOperationTarget_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ICoreDropOperationTarget_Impl::DropAsync(this, core::mem::transmute_copy(&draginfo)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, ICoreDropOperationTarget, OFFSET>(),
EnterAsync: EnterAsync::<Identity, OFFSET>,
OverAsync: OverAsync::<Identity, OFFSET>,
LeaveAsync: LeaveAsync::<Identity, OFFSET>,
DropAsync: DropAsync::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ICoreDropOperationTarget as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDropOperationTarget_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub EnterAsync: 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,
pub OverAsync: 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,
pub LeaveAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DropAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ICoreDropOperationTargetRequestedEventArgs, ICoreDropOperationTargetRequestedEventArgs_Vtbl, 0x2aca929a_5e28_4ea6_829e_29134e665d6d);
impl windows_core::RuntimeType for ICoreDropOperationTargetRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreDropOperationTargetRequestedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SetTarget: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,53 @@
#[cfg(feature = "ApplicationModel_DataTransfer_DragDrop_Core")]
pub mod Core;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DragDropModifiers(pub u32);
impl DragDropModifiers {
pub const None: Self = Self(0u32);
pub const Shift: Self = Self(1u32);
pub const Control: Self = Self(2u32);
pub const Alt: Self = Self(4u32);
pub const LeftButton: Self = Self(8u32);
pub const MiddleButton: Self = Self(16u32);
pub const RightButton: Self = Self(32u32);
}
impl windows_core::TypeKind for DragDropModifiers {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DragDropModifiers {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.DataTransfer.DragDrop.DragDropModifiers;u4)");
}
impl DragDropModifiers {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for DragDropModifiers {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for DragDropModifiers {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for DragDropModifiers {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for DragDropModifiers {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for DragDropModifiers {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
@@ -0,0 +1,212 @@
windows_core::imp::define_interface!(IQuickLink, IQuickLink_Vtbl, 0x603e4308_f0be_4adc_acc9_8b27ab9cf556);
impl windows_core::RuntimeType for IQuickLink {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IQuickLink_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Title: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetTitle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub Thumbnail: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
Thumbnail: usize,
#[cfg(feature = "Storage_Streams")]
pub SetThumbnail: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SetThumbnail: usize,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SupportedDataFormats: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SupportedFileTypes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IShareOperation, IShareOperation_Vtbl, 0x2246bab8_d0f8_41c1_a82a_4137db6504fb);
impl windows_core::RuntimeType for IShareOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IShareOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Data: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub QuickLinkId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveThisQuickLink: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportStarted: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportDataRetrieved: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportSubmittedBackgroundTask: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedWithQuickLink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompleted: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IShareOperation2, IShareOperation2_Vtbl, 0x0ffb97c1_9778_4a09_8e5b_cb5e482d0555);
impl windows_core::RuntimeType for IShareOperation2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IShareOperation2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DismissUI: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IShareOperation3, IShareOperation3_Vtbl, 0x5ef6b382_b7a7_4571_a2a6_994a034988b2);
impl windows_core::RuntimeType for IShareOperation3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IShareOperation3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "ApplicationModel_Contacts")]
pub Contacts: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_Contacts"))]
Contacts: usize,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct QuickLink(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(QuickLink, windows_core::IUnknown, windows_core::IInspectable);
impl QuickLink {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<QuickLink, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Title(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Title)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetTitle(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetTitle)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn Thumbnail(&self) -> windows_core::Result<super::super::super::Storage::Streams::RandomAccessStreamReference> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Thumbnail)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn SetThumbnail<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Storage::Streams::RandomAccessStreamReference>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetThumbnail)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetId(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetId)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn SupportedDataFormats(&self) -> windows_core::Result<windows_collections::IVector<windows_core::HSTRING>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SupportedDataFormats)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SupportedFileTypes(&self) -> windows_core::Result<windows_collections::IVector<windows_core::HSTRING>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SupportedFileTypes)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for QuickLink {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IQuickLink>();
}
unsafe impl windows_core::Interface for QuickLink {
type Vtable = <IQuickLink as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IQuickLink as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for QuickLink {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.ShareTarget.QuickLink";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ShareOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ShareOperation, windows_core::IUnknown, windows_core::IInspectable);
impl ShareOperation {
pub fn Data(&self) -> windows_core::Result<super::DataPackageView> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Data)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn QuickLinkId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).QuickLinkId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn RemoveThisQuickLink(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveThisQuickLink)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportStarted(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportStarted)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportDataRetrieved(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportDataRetrieved)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportSubmittedBackgroundTask(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportSubmittedBackgroundTask)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportCompletedWithQuickLink<P0>(&self, quicklink: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<QuickLink>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompletedWithQuickLink)(windows_core::Interface::as_raw(this), quicklink.param().abi()).ok() }
}
pub fn ReportCompleted(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompleted)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ReportError(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportError)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn DismissUI(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IShareOperation2>(self)?;
unsafe { (windows_core::Interface::vtable(this).DismissUI)(windows_core::Interface::as_raw(this)).ok() }
}
#[cfg(feature = "ApplicationModel_Contacts")]
pub fn Contacts(&self) -> windows_core::Result<windows_collections::IVectorView<super::super::Contacts::Contact>> {
let this = &windows_core::Interface::cast::<IShareOperation3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Contacts)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ShareOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IShareOperation>();
}
unsafe impl windows_core::Interface for ShareOperation {
type Vtable = <IShareOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IShareOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ShareOperation {
const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.ShareTarget.ShareOperation";
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,165 @@
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ExtendedExecutionForegroundReason(pub i32);
impl ExtendedExecutionForegroundReason {
pub const Unspecified: Self = Self(0i32);
pub const SavingData: Self = Self(1i32);
pub const BackgroundAudio: Self = Self(2i32);
pub const Unconstrained: Self = Self(3i32);
}
impl windows_core::TypeKind for ExtendedExecutionForegroundReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ExtendedExecutionForegroundReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ExtendedExecutionForegroundResult(pub i32);
impl ExtendedExecutionForegroundResult {
pub const Allowed: Self = Self(0i32);
pub const Denied: Self = Self(1i32);
}
impl windows_core::TypeKind for ExtendedExecutionForegroundResult {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ExtendedExecutionForegroundResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundResult;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ExtendedExecutionForegroundRevokedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ExtendedExecutionForegroundRevokedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl ExtendedExecutionForegroundRevokedEventArgs {
pub fn Reason(&self) -> windows_core::Result<ExtendedExecutionForegroundRevokedReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Reason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for ExtendedExecutionForegroundRevokedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IExtendedExecutionForegroundRevokedEventArgs>();
}
unsafe impl windows_core::Interface for ExtendedExecutionForegroundRevokedEventArgs {
type Vtable = <IExtendedExecutionForegroundRevokedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IExtendedExecutionForegroundRevokedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ExtendedExecutionForegroundRevokedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs";
}
unsafe impl Send for ExtendedExecutionForegroundRevokedEventArgs {}
unsafe impl Sync for ExtendedExecutionForegroundRevokedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ExtendedExecutionForegroundRevokedReason(pub i32);
impl ExtendedExecutionForegroundRevokedReason {
pub const Resumed: Self = Self(0i32);
pub const SystemPolicy: Self = Self(1i32);
}
impl windows_core::TypeKind for ExtendedExecutionForegroundRevokedReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ExtendedExecutionForegroundRevokedReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ExtendedExecutionForegroundSession(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ExtendedExecutionForegroundSession, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(ExtendedExecutionForegroundSession, super::super::super::Foundation::IClosable);
impl ExtendedExecutionForegroundSession {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ExtendedExecutionForegroundSession, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDescription(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDescription)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn Revoked<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<windows_core::IInspectable, ExtendedExecutionForegroundRevokedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Revoked)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveRevoked(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveRevoked)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn RequestExtensionAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<ExtendedExecutionForegroundResult>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestExtensionAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Reason(&self) -> windows_core::Result<ExtendedExecutionForegroundReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Reason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetReason(&self, value: ExtendedExecutionForegroundReason) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetReason)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for ExtendedExecutionForegroundSession {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IExtendedExecutionForegroundSession>();
}
unsafe impl windows_core::Interface for ExtendedExecutionForegroundSession {
type Vtable = <IExtendedExecutionForegroundSession as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IExtendedExecutionForegroundSession as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ExtendedExecutionForegroundSession {
const NAME: &'static str = "Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession";
}
unsafe impl Send for ExtendedExecutionForegroundSession {}
unsafe impl Sync for ExtendedExecutionForegroundSession {}
windows_core::imp::define_interface!(IExtendedExecutionForegroundRevokedEventArgs, IExtendedExecutionForegroundRevokedEventArgs_Vtbl, 0xb07cd940_9557_aea4_2c99_bdd56d9be461);
impl windows_core::RuntimeType for IExtendedExecutionForegroundRevokedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IExtendedExecutionForegroundRevokedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Reason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ExtendedExecutionForegroundRevokedReason) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IExtendedExecutionForegroundSession, IExtendedExecutionForegroundSession_Vtbl, 0xfbf440e1_9d10_4201_b01e_c83275296f2e);
impl windows_core::RuntimeType for IExtendedExecutionForegroundSession {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IExtendedExecutionForegroundSession_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Revoked: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveRevoked: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub RequestExtensionAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Reason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ExtendedExecutionForegroundReason) -> windows_core::HRESULT,
pub SetReason: unsafe extern "system" fn(*mut core::ffi::c_void, ExtendedExecutionForegroundReason) -> windows_core::HRESULT,
}
@@ -0,0 +1,179 @@
#[cfg(feature = "ApplicationModel_ExtendedExecution_Foreground")]
pub mod Foreground;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ExtendedExecutionReason(pub i32);
impl ExtendedExecutionReason {
pub const Unspecified: Self = Self(0i32);
pub const LocationTracking: Self = Self(1i32);
pub const SavingData: Self = Self(2i32);
}
impl windows_core::TypeKind for ExtendedExecutionReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ExtendedExecutionReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ExtendedExecutionResult(pub i32);
impl ExtendedExecutionResult {
pub const Allowed: Self = Self(0i32);
pub const Denied: Self = Self(1i32);
}
impl windows_core::TypeKind for ExtendedExecutionResult {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ExtendedExecutionResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionResult;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ExtendedExecutionRevokedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ExtendedExecutionRevokedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl ExtendedExecutionRevokedEventArgs {
pub fn Reason(&self) -> windows_core::Result<ExtendedExecutionRevokedReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Reason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for ExtendedExecutionRevokedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IExtendedExecutionRevokedEventArgs>();
}
unsafe impl windows_core::Interface for ExtendedExecutionRevokedEventArgs {
type Vtable = <IExtendedExecutionRevokedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IExtendedExecutionRevokedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ExtendedExecutionRevokedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionRevokedEventArgs";
}
unsafe impl Send for ExtendedExecutionRevokedEventArgs {}
unsafe impl Sync for ExtendedExecutionRevokedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ExtendedExecutionRevokedReason(pub i32);
impl ExtendedExecutionRevokedReason {
pub const Resumed: Self = Self(0i32);
pub const SystemPolicy: Self = Self(1i32);
}
impl windows_core::TypeKind for ExtendedExecutionRevokedReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ExtendedExecutionRevokedReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionRevokedReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ExtendedExecutionSession(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ExtendedExecutionSession, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(ExtendedExecutionSession, super::super::Foundation::IClosable);
impl ExtendedExecutionSession {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ExtendedExecutionSession, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Reason(&self) -> windows_core::Result<ExtendedExecutionReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Reason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetReason(&self, value: ExtendedExecutionReason) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetReason)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDescription(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDescription)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn PercentProgress(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PercentProgress)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetPercentProgress(&self, value: u32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPercentProgress)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Revoked<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<windows_core::IInspectable, ExtendedExecutionRevokedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Revoked)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveRevoked(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveRevoked)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn RequestExtensionAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<ExtendedExecutionResult>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestExtensionAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for ExtendedExecutionSession {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IExtendedExecutionSession>();
}
unsafe impl windows_core::Interface for ExtendedExecutionSession {
type Vtable = <IExtendedExecutionSession as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IExtendedExecutionSession as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ExtendedExecutionSession {
const NAME: &'static str = "Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession";
}
unsafe impl Send for ExtendedExecutionSession {}
unsafe impl Sync for ExtendedExecutionSession {}
windows_core::imp::define_interface!(IExtendedExecutionRevokedEventArgs, IExtendedExecutionRevokedEventArgs_Vtbl, 0xbfbc9f16_63b5_4c0b_aad6_828af5373ec3);
impl windows_core::RuntimeType for IExtendedExecutionRevokedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IExtendedExecutionRevokedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Reason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ExtendedExecutionRevokedReason) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IExtendedExecutionSession, IExtendedExecutionSession_Vtbl, 0xaf908a2d_118b_48f1_9308_0c4fc41e200f);
impl windows_core::RuntimeType for IExtendedExecutionSession {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IExtendedExecutionSession_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Reason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ExtendedExecutionReason) -> windows_core::HRESULT,
pub SetReason: unsafe extern "system" fn(*mut core::ffi::c_void, ExtendedExecutionReason) -> windows_core::HRESULT,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PercentProgress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetPercentProgress: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub Revoked: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveRevoked: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub RequestExtensionAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,76 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct HolographicKeyboard(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(HolographicKeyboard, windows_core::IUnknown, windows_core::IInspectable);
impl HolographicKeyboard {
#[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))]
pub fn SetPlacementOverride<P0>(&self, coordinatesystem: P0, topcenterposition: windows_numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Perception::Spatial::SpatialCoordinateSystem>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPlacementOverride)(windows_core::Interface::as_raw(this), coordinatesystem.param().abi(), topcenterposition, orientation).ok() }
}
#[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))]
pub fn SetPlacementOverrideWithMaxSize<P0>(&self, coordinatesystem: P0, topcenterposition: windows_numerics::Vector3, orientation: super::super::Foundation::Numerics::Quaternion, maxsize: windows_numerics::Vector2) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Perception::Spatial::SpatialCoordinateSystem>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPlacementOverrideWithMaxSize)(windows_core::Interface::as_raw(this), coordinatesystem.param().abi(), topcenterposition, orientation, maxsize).ok() }
}
pub fn ResetPlacementOverride(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ResetPlacementOverride)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn GetDefault() -> windows_core::Result<HolographicKeyboard> {
Self::IHolographicKeyboardStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefault)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IHolographicKeyboardStatics<R, F: FnOnce(&IHolographicKeyboardStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<HolographicKeyboard, IHolographicKeyboardStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for HolographicKeyboard {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IHolographicKeyboard>();
}
unsafe impl windows_core::Interface for HolographicKeyboard {
type Vtable = <IHolographicKeyboard as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IHolographicKeyboard as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for HolographicKeyboard {
const NAME: &'static str = "Windows.ApplicationModel.Holographic.HolographicKeyboard";
}
unsafe impl Send for HolographicKeyboard {}
unsafe impl Sync for HolographicKeyboard {}
windows_core::imp::define_interface!(IHolographicKeyboard, IHolographicKeyboard_Vtbl, 0x07dd0893_aa21_5e6f_a91b_11b2b3fd7be3);
impl windows_core::RuntimeType for IHolographicKeyboard {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IHolographicKeyboard_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))]
pub SetPlacementOverride: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_numerics::Vector3, super::super::Foundation::Numerics::Quaternion) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Foundation_Numerics", feature = "Perception_Spatial")))]
SetPlacementOverride: usize,
#[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))]
pub SetPlacementOverrideWithMaxSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_numerics::Vector3, super::super::Foundation::Numerics::Quaternion, windows_numerics::Vector2) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Foundation_Numerics", feature = "Perception_Spatial")))]
SetPlacementOverrideWithMaxSize: usize,
pub ResetPlacementOverride: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IHolographicKeyboardStatics, IHolographicKeyboardStatics_Vtbl, 0xb676c624_63d7_58cf_b06b_08baa032a23f);
impl windows_core::RuntimeType for IHolographicKeyboardStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IHolographicKeyboardStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,346 @@
windows_core::imp::define_interface!(ILockApplicationHost, ILockApplicationHost_Vtbl, 0x38ee31ad_d94f_4e7c_81fa_4f4436506281);
impl windows_core::RuntimeType for ILockApplicationHost {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILockApplicationHost_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestUnlock: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Unlocking: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveUnlocking: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILockApplicationHostStatics, ILockApplicationHostStatics_Vtbl, 0xf48fab8e_23d7_4e63_96a1_666ff52d3b2c);
impl windows_core::RuntimeType for ILockApplicationHostStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILockApplicationHostStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILockScreenBadge, ILockScreenBadge_Vtbl, 0xe95105d9_2bff_4db0_9b4f_3824778b9c9a);
impl windows_core::RuntimeType for ILockScreenBadge {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILockScreenBadge_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Streams")]
pub Logo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
Logo: usize,
#[cfg(feature = "Storage_Streams")]
pub Glyph: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
Glyph: usize,
pub Number: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AutomationName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub LaunchApp: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILockScreenInfo, ILockScreenInfo_Vtbl, 0xf59aa65c_9711_4dc9_a630_95b6cb8cdad0);
impl windows_core::RuntimeType for ILockScreenInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILockScreenInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub LockScreenImageChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveLockScreenImageChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub LockScreenImage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
LockScreenImage: usize,
pub BadgesChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveBadgesChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Badges: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DetailTextChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveDetailTextChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub DetailText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AlarmIconChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveAlarmIconChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub AlarmIcon: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
AlarmIcon: usize,
}
windows_core::imp::define_interface!(ILockScreenUnlockingDeferral, ILockScreenUnlockingDeferral_Vtbl, 0x7e7d1ad6_5203_43e7_9bd6_7c3947d1e3fe);
impl windows_core::RuntimeType for ILockScreenUnlockingDeferral {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILockScreenUnlockingDeferral_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Complete: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILockScreenUnlockingEventArgs, ILockScreenUnlockingEventArgs_Vtbl, 0x44e6c007_75fb_4abb_9f8b_824748900c71);
impl windows_core::RuntimeType for ILockScreenUnlockingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILockScreenUnlockingEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Deadline: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::DateTime) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LockApplicationHost(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LockApplicationHost, windows_core::IUnknown, windows_core::IInspectable);
impl LockApplicationHost {
pub fn RequestUnlock(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RequestUnlock)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Unlocking<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<LockApplicationHost, LockScreenUnlockingEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Unlocking)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveUnlocking(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveUnlocking)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetForCurrentView() -> windows_core::Result<LockApplicationHost> {
Self::ILockApplicationHostStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn ILockApplicationHostStatics<R, F: FnOnce(&ILockApplicationHostStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<LockApplicationHost, ILockApplicationHostStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for LockApplicationHost {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILockApplicationHost>();
}
unsafe impl windows_core::Interface for LockApplicationHost {
type Vtable = <ILockApplicationHost as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILockApplicationHost as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LockApplicationHost {
const NAME: &'static str = "Windows.ApplicationModel.LockScreen.LockApplicationHost";
}
unsafe impl Send for LockApplicationHost {}
unsafe impl Sync for LockApplicationHost {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LockScreenBadge(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LockScreenBadge, windows_core::IUnknown, windows_core::IInspectable);
impl LockScreenBadge {
#[cfg(feature = "Storage_Streams")]
pub fn Logo(&self) -> windows_core::Result<super::super::Storage::Streams::IRandomAccessStream> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Logo)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn Glyph(&self) -> windows_core::Result<super::super::Storage::Streams::IRandomAccessStream> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Glyph)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Number(&self) -> windows_core::Result<super::super::Foundation::IReference<u32>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Number)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AutomationName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AutomationName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn LaunchApp(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).LaunchApp)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for LockScreenBadge {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILockScreenBadge>();
}
unsafe impl windows_core::Interface for LockScreenBadge {
type Vtable = <ILockScreenBadge as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILockScreenBadge as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LockScreenBadge {
const NAME: &'static str = "Windows.ApplicationModel.LockScreen.LockScreenBadge";
}
unsafe impl Send for LockScreenBadge {}
unsafe impl Sync for LockScreenBadge {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LockScreenInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LockScreenInfo, windows_core::IUnknown, windows_core::IInspectable);
impl LockScreenInfo {
pub fn LockScreenImageChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<LockScreenInfo, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LockScreenImageChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveLockScreenImageChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveLockScreenImageChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn LockScreenImage(&self) -> windows_core::Result<super::super::Storage::Streams::IRandomAccessStream> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LockScreenImage)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn BadgesChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<LockScreenInfo, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BadgesChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveBadgesChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveBadgesChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Badges(&self) -> windows_core::Result<windows_collections::IVectorView<LockScreenBadge>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Badges)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DetailTextChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<LockScreenInfo, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DetailTextChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveDetailTextChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveDetailTextChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn DetailText(&self) -> windows_core::Result<windows_collections::IVectorView<windows_core::HSTRING>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DetailText)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AlarmIconChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<LockScreenInfo, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AlarmIconChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveAlarmIconChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveAlarmIconChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn AlarmIcon(&self) -> windows_core::Result<super::super::Storage::Streams::IRandomAccessStream> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AlarmIcon)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for LockScreenInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILockScreenInfo>();
}
unsafe impl windows_core::Interface for LockScreenInfo {
type Vtable = <ILockScreenInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILockScreenInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LockScreenInfo {
const NAME: &'static str = "Windows.ApplicationModel.LockScreen.LockScreenInfo";
}
unsafe impl Send for LockScreenInfo {}
unsafe impl Sync for LockScreenInfo {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LockScreenUnlockingDeferral(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LockScreenUnlockingDeferral, windows_core::IUnknown, windows_core::IInspectable);
impl LockScreenUnlockingDeferral {
pub fn Complete(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Complete)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for LockScreenUnlockingDeferral {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILockScreenUnlockingDeferral>();
}
unsafe impl windows_core::Interface for LockScreenUnlockingDeferral {
type Vtable = <ILockScreenUnlockingDeferral as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILockScreenUnlockingDeferral as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LockScreenUnlockingDeferral {
const NAME: &'static str = "Windows.ApplicationModel.LockScreen.LockScreenUnlockingDeferral";
}
unsafe impl Send for LockScreenUnlockingDeferral {}
unsafe impl Sync for LockScreenUnlockingDeferral {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LockScreenUnlockingEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LockScreenUnlockingEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl LockScreenUnlockingEventArgs {
pub fn GetDeferral(&self) -> windows_core::Result<LockScreenUnlockingDeferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Deadline(&self) -> windows_core::Result<super::super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Deadline)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for LockScreenUnlockingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILockScreenUnlockingEventArgs>();
}
unsafe impl windows_core::Interface for LockScreenUnlockingEventArgs {
type Vtable = <ILockScreenUnlockingEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILockScreenUnlockingEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LockScreenUnlockingEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.LockScreen.LockScreenUnlockingEventArgs";
}
unsafe impl Send for LockScreenUnlockingEventArgs {}
unsafe impl Sync for LockScreenUnlockingEventArgs {}
@@ -0,0 +1,497 @@
windows_core::imp::define_interface!(IPackageExtension, IPackageExtension_Vtbl, 0xda70c957_7ead_5c3b_9cf0_cc43faf474b4);
impl windows_core::RuntimeType for IPackageExtension {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtension_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Foundation_Collections")]
pub GetExtensionProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
GetExtensionProperties: usize,
#[cfg(feature = "Foundation_Collections")]
pub GetExtensionPropertiesAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
GetExtensionPropertiesAsync: usize,
pub GetPublicPath: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Search")]
pub GetPublicFolder: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Search"))]
GetPublicFolder: usize,
#[cfg(feature = "Storage_Search")]
pub GetPublicFolderAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Search"))]
GetPublicFolderAsync: usize,
}
windows_core::imp::define_interface!(IPackageExtensionCatalog, IPackageExtensionCatalog_Vtbl, 0x0879dfe6_ac30_58b2_97f9_480b07e75bfa);
impl windows_core::RuntimeType for IPackageExtensionCatalog {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtensionCatalog_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FindAll: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FindAllAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestRemovePackageAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PackageInstalled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageInstalled: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageUpdating: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageUpdating: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageUninstalling: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageUninstalling: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub PackageStatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePackageStatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPackageExtensionCatalogStatics, IPackageExtensionCatalogStatics_Vtbl, 0x9588ece4_3183_5684_9e5f_27759733ddfe);
impl windows_core::RuntimeType for IPackageExtensionCatalogStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtensionCatalogStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Open: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPackageExtensionPackageInstalledEventArgs, IPackageExtensionPackageInstalledEventArgs_Vtbl, 0x3c9b0067_083c_5fe3_bdfb_9feb156b4118);
impl windows_core::RuntimeType for IPackageExtensionPackageInstalledEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtensionPackageInstalledEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PackageExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Extensions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPackageExtensionPackageStatusChangedEventArgs, IPackageExtensionPackageStatusChangedEventArgs_Vtbl, 0xb8fee20a_680d_5942_876c_5de12df1083c);
impl windows_core::RuntimeType for IPackageExtensionPackageStatusChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtensionPackageStatusChangedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PackageExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPackageExtensionPackageUninstallingEventArgs, IPackageExtensionPackageUninstallingEventArgs_Vtbl, 0x3b8e9cb7_c539_554d_bb33_a84c0bfa3f50);
impl windows_core::RuntimeType for IPackageExtensionPackageUninstallingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtensionPackageUninstallingEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PackageExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPackageExtensionPackageUpdatedEventArgs, IPackageExtensionPackageUpdatedEventArgs_Vtbl, 0xfdc31add_16a7_509d_8bc4_fde22e856d2d);
impl windows_core::RuntimeType for IPackageExtensionPackageUpdatedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtensionPackageUpdatedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PackageExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Extensions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPackageExtensionPackageUpdatingEventArgs, IPackageExtensionPackageUpdatingEventArgs_Vtbl, 0x27ae2ce1_a1d3_532e_8e7e_8b43782fce09);
impl windows_core::RuntimeType for IPackageExtensionPackageUpdatingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPackageExtensionPackageUpdatingEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PackageExtensionName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Package: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PackageExtension(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PackageExtension, windows_core::IUnknown, windows_core::IInspectable);
impl PackageExtension {
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn GetExtensionProperties(&self) -> windows_core::Result<super::super::Foundation::Collections::IPropertySet> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetExtensionProperties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn GetExtensionPropertiesAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Foundation::Collections::IPropertySet>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetExtensionPropertiesAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetPublicPath(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPublicPath)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "Storage_Search")]
pub fn GetPublicFolder(&self) -> windows_core::Result<super::super::Storage::StorageFolder> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPublicFolder)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Search")]
pub fn GetPublicFolderAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Storage::StorageFolder>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPublicFolderAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PackageExtension {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPackageExtension>();
}
unsafe impl windows_core::Interface for PackageExtension {
type Vtable = <IPackageExtension as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPackageExtension as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PackageExtension {
const NAME: &'static str = "Windows.ApplicationModel.PackageExtensions.PackageExtension";
}
unsafe impl Send for PackageExtension {}
unsafe impl Sync for PackageExtension {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PackageExtensionCatalog(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PackageExtensionCatalog, windows_core::IUnknown, windows_core::IInspectable);
impl PackageExtensionCatalog {
pub fn FindAll(&self) -> windows_core::Result<windows_collections::IVectorView<PackageExtension>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAll)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn FindAllAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<PackageExtension>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAllAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestRemovePackageAsync(&self, packagefullname: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestRemovePackageAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(packagefullname), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn PackageInstalled<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PackageExtensionCatalog, PackageExtensionPackageInstalledEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageInstalled)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageInstalled(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageInstalled)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageUpdating<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PackageExtensionCatalog, PackageExtensionPackageUpdatingEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageUpdating)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageUpdating(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageUpdating)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageUpdated<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PackageExtensionCatalog, PackageExtensionPackageUpdatedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageUpdated)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageUpdated(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageUpdated)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageUninstalling<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PackageExtensionCatalog, PackageExtensionPackageUninstallingEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageUninstalling)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageUninstalling(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageUninstalling)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn PackageStatusChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PackageExtensionCatalog, PackageExtensionPackageStatusChangedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageStatusChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePackageStatusChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePackageStatusChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Open(packageextensionname: &windows_core::HSTRING) -> windows_core::Result<PackageExtensionCatalog> {
Self::IPackageExtensionCatalogStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Open)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(packageextensionname), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPackageExtensionCatalogStatics<R, F: FnOnce(&IPackageExtensionCatalogStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PackageExtensionCatalog, IPackageExtensionCatalogStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PackageExtensionCatalog {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPackageExtensionCatalog>();
}
unsafe impl windows_core::Interface for PackageExtensionCatalog {
type Vtable = <IPackageExtensionCatalog as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPackageExtensionCatalog as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PackageExtensionCatalog {
const NAME: &'static str = "Windows.ApplicationModel.PackageExtensions.PackageExtensionCatalog";
}
unsafe impl Send for PackageExtensionCatalog {}
unsafe impl Sync for PackageExtensionCatalog {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PackageExtensionPackageInstalledEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PackageExtensionPackageInstalledEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PackageExtensionPackageInstalledEventArgs {
pub fn PackageExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Extensions(&self) -> windows_core::Result<windows_collections::IVectorView<PackageExtension>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Extensions)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PackageExtensionPackageInstalledEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPackageExtensionPackageInstalledEventArgs>();
}
unsafe impl windows_core::Interface for PackageExtensionPackageInstalledEventArgs {
type Vtable = <IPackageExtensionPackageInstalledEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPackageExtensionPackageInstalledEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PackageExtensionPackageInstalledEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.PackageExtensions.PackageExtensionPackageInstalledEventArgs";
}
unsafe impl Send for PackageExtensionPackageInstalledEventArgs {}
unsafe impl Sync for PackageExtensionPackageInstalledEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PackageExtensionPackageStatusChangedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PackageExtensionPackageStatusChangedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PackageExtensionPackageStatusChangedEventArgs {
pub fn PackageExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PackageExtensionPackageStatusChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPackageExtensionPackageStatusChangedEventArgs>();
}
unsafe impl windows_core::Interface for PackageExtensionPackageStatusChangedEventArgs {
type Vtable = <IPackageExtensionPackageStatusChangedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPackageExtensionPackageStatusChangedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PackageExtensionPackageStatusChangedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.PackageExtensions.PackageExtensionPackageStatusChangedEventArgs";
}
unsafe impl Send for PackageExtensionPackageStatusChangedEventArgs {}
unsafe impl Sync for PackageExtensionPackageStatusChangedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PackageExtensionPackageUninstallingEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PackageExtensionPackageUninstallingEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PackageExtensionPackageUninstallingEventArgs {
pub fn PackageExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PackageExtensionPackageUninstallingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPackageExtensionPackageUninstallingEventArgs>();
}
unsafe impl windows_core::Interface for PackageExtensionPackageUninstallingEventArgs {
type Vtable = <IPackageExtensionPackageUninstallingEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPackageExtensionPackageUninstallingEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PackageExtensionPackageUninstallingEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.PackageExtensions.PackageExtensionPackageUninstallingEventArgs";
}
unsafe impl Send for PackageExtensionPackageUninstallingEventArgs {}
unsafe impl Sync for PackageExtensionPackageUninstallingEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PackageExtensionPackageUpdatedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PackageExtensionPackageUpdatedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PackageExtensionPackageUpdatedEventArgs {
pub fn PackageExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Extensions(&self) -> windows_core::Result<windows_collections::IVectorView<PackageExtension>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Extensions)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PackageExtensionPackageUpdatedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPackageExtensionPackageUpdatedEventArgs>();
}
unsafe impl windows_core::Interface for PackageExtensionPackageUpdatedEventArgs {
type Vtable = <IPackageExtensionPackageUpdatedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPackageExtensionPackageUpdatedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PackageExtensionPackageUpdatedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.PackageExtensions.PackageExtensionPackageUpdatedEventArgs";
}
unsafe impl Send for PackageExtensionPackageUpdatedEventArgs {}
unsafe impl Sync for PackageExtensionPackageUpdatedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PackageExtensionPackageUpdatingEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PackageExtensionPackageUpdatingEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PackageExtensionPackageUpdatingEventArgs {
pub fn PackageExtensionName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageExtensionName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Package(&self) -> windows_core::Result<super::Package> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Package)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PackageExtensionPackageUpdatingEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPackageExtensionPackageUpdatingEventArgs>();
}
unsafe impl windows_core::Interface for PackageExtensionPackageUpdatingEventArgs {
type Vtable = <IPackageExtensionPackageUpdatingEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPackageExtensionPackageUpdatingEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PackageExtensionPackageUpdatingEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.PackageExtensions.PackageExtensionPackageUpdatingEventArgs";
}
unsafe impl Send for PackageExtensionPackageUpdatingEventArgs {}
unsafe impl Sync for PackageExtensionPackageUpdatingEventArgs {}
@@ -0,0 +1,276 @@
windows_core::imp::define_interface!(IPaymentAppCanMakePaymentTriggerDetails, IPaymentAppCanMakePaymentTriggerDetails_Vtbl, 0x0ce201f0_8b93_4eb6_8c46_2e4a6c6a26f6);
impl windows_core::RuntimeType for IPaymentAppCanMakePaymentTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentAppCanMakePaymentTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCanMakePaymentResult: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPaymentAppManager, IPaymentAppManager_Vtbl, 0x0e47aa53_8521_4969_a957_df2538a3a98f);
impl windows_core::RuntimeType for IPaymentAppManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentAppManager_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RegisterAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UnregisterAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPaymentAppManagerStatics, IPaymentAppManagerStatics_Vtbl, 0xa341ac28_fc89_4406_b4d9_34e7fe79dfb6);
impl windows_core::RuntimeType for IPaymentAppManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentAppManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Current: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPaymentTransaction, IPaymentTransaction_Vtbl, 0x62581da0_26a5_4e9b_a6eb_66606cf001d3);
impl windows_core::RuntimeType for IPaymentTransaction {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentTransaction_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PaymentRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PayerEmail: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPayerEmail: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PayerName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPayerName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PayerPhoneNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPayerPhoneNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UpdateShippingAddressAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UpdateSelectedShippingOptionAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AcceptAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Reject: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPaymentTransactionAcceptResult, IPaymentTransactionAcceptResult_Vtbl, 0x060e3276_d30c_4817_95a2_df7ae9273b56);
impl windows_core::RuntimeType for IPaymentTransactionAcceptResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentTransactionAcceptResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::PaymentRequestCompletionStatus) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPaymentTransactionStatics, IPaymentTransactionStatics_Vtbl, 0x8d639750_ee0a_4df5_9b1e_1c0f9ec59881);
impl windows_core::RuntimeType for IPaymentTransactionStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPaymentTransactionStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PaymentAppCanMakePaymentTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PaymentAppCanMakePaymentTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PaymentAppCanMakePaymentTriggerDetails {
pub fn Request(&self) -> windows_core::Result<super::PaymentRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportCanMakePaymentResult<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::PaymentCanMakePaymentResult>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCanMakePaymentResult)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
}
impl windows_core::RuntimeType for PaymentAppCanMakePaymentTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPaymentAppCanMakePaymentTriggerDetails>();
}
unsafe impl windows_core::Interface for PaymentAppCanMakePaymentTriggerDetails {
type Vtable = <IPaymentAppCanMakePaymentTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPaymentAppCanMakePaymentTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PaymentAppCanMakePaymentTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentAppCanMakePaymentTriggerDetails";
}
unsafe impl Send for PaymentAppCanMakePaymentTriggerDetails {}
unsafe impl Sync for PaymentAppCanMakePaymentTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PaymentAppManager(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PaymentAppManager, windows_core::IUnknown, windows_core::IInspectable);
impl PaymentAppManager {
pub fn RegisterAsync<P0>(&self, supportedpaymentmethodids: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RegisterAsync)(windows_core::Interface::as_raw(this), supportedpaymentmethodids.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn UnregisterAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UnregisterAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Current() -> windows_core::Result<PaymentAppManager> {
Self::IPaymentAppManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Current)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPaymentAppManagerStatics<R, F: FnOnce(&IPaymentAppManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PaymentAppManager, IPaymentAppManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PaymentAppManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPaymentAppManager>();
}
unsafe impl windows_core::Interface for PaymentAppManager {
type Vtable = <IPaymentAppManager as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPaymentAppManager as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PaymentAppManager {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentAppManager";
}
unsafe impl Send for PaymentAppManager {}
unsafe impl Sync for PaymentAppManager {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PaymentTransaction(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PaymentTransaction, windows_core::IUnknown, windows_core::IInspectable);
impl PaymentTransaction {
pub fn PaymentRequest(&self) -> windows_core::Result<super::PaymentRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PaymentRequest)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn PayerEmail(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PayerEmail)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetPayerEmail(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPayerEmail)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn PayerName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PayerName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetPayerName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPayerName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn PayerPhoneNumber(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PayerPhoneNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetPayerPhoneNumber(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPayerPhoneNumber)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn UpdateShippingAddressAsync<P0>(&self, shippingaddress: P0) -> windows_core::Result<windows_future::IAsyncOperation<super::PaymentRequestChangedResult>>
where
P0: windows_core::Param<super::PaymentAddress>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UpdateShippingAddressAsync)(windows_core::Interface::as_raw(this), shippingaddress.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn UpdateSelectedShippingOptionAsync<P0>(&self, selectedshippingoption: P0) -> windows_core::Result<windows_future::IAsyncOperation<super::PaymentRequestChangedResult>>
where
P0: windows_core::Param<super::PaymentShippingOption>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UpdateSelectedShippingOptionAsync)(windows_core::Interface::as_raw(this), selectedshippingoption.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AcceptAsync<P0>(&self, paymenttoken: P0) -> windows_core::Result<windows_future::IAsyncOperation<PaymentTransactionAcceptResult>>
where
P0: windows_core::Param<super::PaymentToken>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AcceptAsync)(windows_core::Interface::as_raw(this), paymenttoken.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Reject(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Reject)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn FromIdAsync(id: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<PaymentTransaction>> {
Self::IPaymentTransactionStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPaymentTransactionStatics<R, F: FnOnce(&IPaymentTransactionStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PaymentTransaction, IPaymentTransactionStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PaymentTransaction {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPaymentTransaction>();
}
unsafe impl windows_core::Interface for PaymentTransaction {
type Vtable = <IPaymentTransaction as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPaymentTransaction as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PaymentTransaction {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentTransaction";
}
unsafe impl Send for PaymentTransaction {}
unsafe impl Sync for PaymentTransaction {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PaymentTransactionAcceptResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PaymentTransactionAcceptResult, windows_core::IUnknown, windows_core::IInspectable);
impl PaymentTransactionAcceptResult {
pub fn Status(&self) -> windows_core::Result<super::PaymentRequestCompletionStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PaymentTransactionAcceptResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPaymentTransactionAcceptResult>();
}
unsafe impl windows_core::Interface for PaymentTransactionAcceptResult {
type Vtable = <IPaymentTransactionAcceptResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPaymentTransactionAcceptResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PaymentTransactionAcceptResult {
const NAME: &'static str = "Windows.ApplicationModel.Payments.Provider.PaymentTransactionAcceptResult";
}
unsafe impl Send for PaymentTransactionAcceptResult {}
unsafe impl Sync for PaymentTransactionAcceptResult {}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,116 @@
pub struct HolographicApplicationPreview;
impl HolographicApplicationPreview {
pub fn IsCurrentViewPresentedOnHolographicDisplay() -> windows_core::Result<bool> {
Self::IHolographicApplicationPreviewStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsCurrentViewPresentedOnHolographicDisplay)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
#[cfg(feature = "ApplicationModel_Activation")]
pub fn IsHolographicActivation<P0>(activatedeventargs: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<super::super::Activation::IActivatedEventArgs>,
{
Self::IHolographicApplicationPreviewStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsHolographicActivation)(windows_core::Interface::as_raw(this), activatedeventargs.param().abi(), &mut result__).map(|| result__)
})
}
fn IHolographicApplicationPreviewStatics<R, F: FnOnce(&IHolographicApplicationPreviewStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<HolographicApplicationPreview, IHolographicApplicationPreviewStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for HolographicApplicationPreview {
const NAME: &'static str = "Windows.ApplicationModel.Preview.Holographic.HolographicApplicationPreview";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct HolographicKeyboardPlacementOverridePreview(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(HolographicKeyboardPlacementOverridePreview, windows_core::IUnknown, windows_core::IInspectable);
impl HolographicKeyboardPlacementOverridePreview {
#[cfg(feature = "Perception_Spatial")]
pub fn SetPlacementOverride<P0>(&self, coordinatesystem: P0, topcenterposition: windows_numerics::Vector3, normal: windows_numerics::Vector3) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Perception::Spatial::SpatialCoordinateSystem>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPlacementOverride)(windows_core::Interface::as_raw(this), coordinatesystem.param().abi(), topcenterposition, normal).ok() }
}
#[cfg(feature = "Perception_Spatial")]
pub fn SetPlacementOverrideWithMaxSize<P0>(&self, coordinatesystem: P0, topcenterposition: windows_numerics::Vector3, normal: windows_numerics::Vector3, maxsize: windows_numerics::Vector2) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Perception::Spatial::SpatialCoordinateSystem>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPlacementOverrideWithMaxSize)(windows_core::Interface::as_raw(this), coordinatesystem.param().abi(), topcenterposition, normal, maxsize).ok() }
}
pub fn ResetPlacementOverride(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ResetPlacementOverride)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn GetForCurrentView() -> windows_core::Result<HolographicKeyboardPlacementOverridePreview> {
Self::IHolographicKeyboardPlacementOverridePreviewStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IHolographicKeyboardPlacementOverridePreviewStatics<R, F: FnOnce(&IHolographicKeyboardPlacementOverridePreviewStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<HolographicKeyboardPlacementOverridePreview, IHolographicKeyboardPlacementOverridePreviewStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for HolographicKeyboardPlacementOverridePreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IHolographicKeyboardPlacementOverridePreview>();
}
unsafe impl windows_core::Interface for HolographicKeyboardPlacementOverridePreview {
type Vtable = <IHolographicKeyboardPlacementOverridePreview as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IHolographicKeyboardPlacementOverridePreview as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for HolographicKeyboardPlacementOverridePreview {
const NAME: &'static str = "Windows.ApplicationModel.Preview.Holographic.HolographicKeyboardPlacementOverridePreview";
}
unsafe impl Send for HolographicKeyboardPlacementOverridePreview {}
unsafe impl Sync for HolographicKeyboardPlacementOverridePreview {}
windows_core::imp::define_interface!(IHolographicApplicationPreviewStatics, IHolographicApplicationPreviewStatics_Vtbl, 0xfe038691_2a3a_45a9_a208_7bed691919f3);
impl windows_core::RuntimeType for IHolographicApplicationPreviewStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IHolographicApplicationPreviewStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsCurrentViewPresentedOnHolographicDisplay: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
#[cfg(feature = "ApplicationModel_Activation")]
pub IsHolographicActivation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_Activation"))]
IsHolographicActivation: usize,
}
windows_core::imp::define_interface!(IHolographicKeyboardPlacementOverridePreview, IHolographicKeyboardPlacementOverridePreview_Vtbl, 0xc8a8ce3a_dfde_5a14_8d5f_182c526dd9c4);
impl windows_core::RuntimeType for IHolographicKeyboardPlacementOverridePreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IHolographicKeyboardPlacementOverridePreview_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Perception_Spatial")]
pub SetPlacementOverride: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_numerics::Vector3, windows_numerics::Vector3) -> windows_core::HRESULT,
#[cfg(not(feature = "Perception_Spatial"))]
SetPlacementOverride: usize,
#[cfg(feature = "Perception_Spatial")]
pub SetPlacementOverrideWithMaxSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_numerics::Vector3, windows_numerics::Vector3, windows_numerics::Vector2) -> windows_core::HRESULT,
#[cfg(not(feature = "Perception_Spatial"))]
SetPlacementOverrideWithMaxSize: usize,
pub ResetPlacementOverride: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IHolographicKeyboardPlacementOverridePreviewStatics, IHolographicKeyboardPlacementOverridePreviewStatics_Vtbl, 0x202e6039_1ff6_5a06_aac4_a5e24fa3ec4b);
impl windows_core::RuntimeType for IHolographicKeyboardPlacementOverridePreviewStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IHolographicKeyboardPlacementOverridePreviewStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,62 @@
windows_core::imp::define_interface!(IInkWorkspaceHostedAppManager, IInkWorkspaceHostedAppManager_Vtbl, 0xfe0a7990_5e59_4bb7_8a63_7d218cd96300);
impl windows_core::RuntimeType for IInkWorkspaceHostedAppManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IInkWorkspaceHostedAppManager_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Graphics_Imaging")]
pub SetThumbnailAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics_Imaging"))]
SetThumbnailAsync: usize,
}
windows_core::imp::define_interface!(IInkWorkspaceHostedAppManagerStatics, IInkWorkspaceHostedAppManagerStatics_Vtbl, 0xcbfd8cc5_a162_4bc4_84ee_e8716d5233c5);
impl windows_core::RuntimeType for IInkWorkspaceHostedAppManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IInkWorkspaceHostedAppManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentApp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct InkWorkspaceHostedAppManager(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(InkWorkspaceHostedAppManager, windows_core::IUnknown, windows_core::IInspectable);
impl InkWorkspaceHostedAppManager {
#[cfg(feature = "Graphics_Imaging")]
pub fn SetThumbnailAsync<P0>(&self, bitmap: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::super::super::Graphics::Imaging::SoftwareBitmap>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SetThumbnailAsync)(windows_core::Interface::as_raw(this), bitmap.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetForCurrentApp() -> windows_core::Result<InkWorkspaceHostedAppManager> {
Self::IInkWorkspaceHostedAppManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentApp)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IInkWorkspaceHostedAppManagerStatics<R, F: FnOnce(&IInkWorkspaceHostedAppManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<InkWorkspaceHostedAppManager, IInkWorkspaceHostedAppManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for InkWorkspaceHostedAppManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IInkWorkspaceHostedAppManager>();
}
unsafe impl windows_core::Interface for InkWorkspaceHostedAppManager {
type Vtable = <IInkWorkspaceHostedAppManager as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IInkWorkspaceHostedAppManager as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for InkWorkspaceHostedAppManager {
const NAME: &'static str = "Windows.ApplicationModel.Preview.InkWorkspace.InkWorkspaceHostedAppManager";
}
unsafe impl Send for InkWorkspaceHostedAppManager {}
unsafe impl Sync for InkWorkspaceHostedAppManager {}
@@ -0,0 +1,345 @@
windows_core::imp::define_interface!(INotePlacementChangedPreviewEventArgs, INotePlacementChangedPreviewEventArgs_Vtbl, 0x491d57b7_f780_4e7f_a939_9a4caf965214);
impl windows_core::RuntimeType for INotePlacementChangedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct INotePlacementChangedPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ViewId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(INoteVisibilityChangedPreviewEventArgs, INoteVisibilityChangedPreviewEventArgs_Vtbl, 0x0e34649e_3815_4ff6_83b3_a14d17120e24);
impl windows_core::RuntimeType for INoteVisibilityChangedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct INoteVisibilityChangedPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ViewId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub IsVisible: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(INotesWindowManagerPreview, INotesWindowManagerPreview_Vtbl, 0xdc2ac23e_4850_4f13_9cc7_ff487efdfcde);
impl windows_core::RuntimeType for INotesWindowManagerPreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct INotesWindowManagerPreview_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsScreenLocked: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ShowNote: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub ShowNoteRelativeTo: unsafe extern "system" fn(*mut core::ffi::c_void, i32, i32) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub ShowNoteWithPlacement: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
ShowNoteWithPlacement: usize,
pub HideNote: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub GetNotePlacement: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
GetNotePlacement: usize,
pub TrySetNoteSize: unsafe extern "system" fn(*mut core::ffi::c_void, i32, super::super::super::Foundation::Size, *mut bool) -> windows_core::HRESULT,
pub SetFocusToNextView: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub SetNotesThumbnailAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SetNotesThumbnailAsync: usize,
pub SystemLockStateChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveSystemLockStateChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub NotePlacementChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveNotePlacementChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub NoteVisibilityChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveNoteVisibilityChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(INotesWindowManagerPreview2, INotesWindowManagerPreview2_Vtbl, 0xedfe864a_1f54_4b09_9823_ff477f6fa3bc);
impl windows_core::RuntimeType for INotesWindowManagerPreview2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct INotesWindowManagerPreview2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ShowNoteRelativeToWithOptions: unsafe extern "system" fn(*mut core::ffi::c_void, i32, i32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub ShowNoteWithPlacementWithOptions: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
ShowNoteWithPlacementWithOptions: usize,
pub SetFocusToPreviousView: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Graphics_Imaging")]
pub SetThumbnailImageForTaskSwitcherAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics_Imaging"))]
SetThumbnailImageForTaskSwitcherAsync: usize,
}
windows_core::imp::define_interface!(INotesWindowManagerPreviewShowNoteOptions, INotesWindowManagerPreviewShowNoteOptions_Vtbl, 0x886b09d6_a6ae_4007_a56d_1ca70c84c0d2);
impl windows_core::RuntimeType for INotesWindowManagerPreviewShowNoteOptions {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct INotesWindowManagerPreviewShowNoteOptions_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ShowWithFocus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetShowWithFocus: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(INotesWindowManagerPreviewStatics, INotesWindowManagerPreviewStatics_Vtbl, 0x6668cc88_0a8e_4127_a38e_995445868a78);
impl windows_core::RuntimeType for INotesWindowManagerPreviewStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct INotesWindowManagerPreviewStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentApp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct NotePlacementChangedPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(NotePlacementChangedPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl NotePlacementChangedPreviewEventArgs {
pub fn ViewId(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ViewId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for NotePlacementChangedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, INotePlacementChangedPreviewEventArgs>();
}
unsafe impl windows_core::Interface for NotePlacementChangedPreviewEventArgs {
type Vtable = <INotePlacementChangedPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <INotePlacementChangedPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for NotePlacementChangedPreviewEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NotePlacementChangedPreviewEventArgs";
}
unsafe impl Send for NotePlacementChangedPreviewEventArgs {}
unsafe impl Sync for NotePlacementChangedPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct NoteVisibilityChangedPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(NoteVisibilityChangedPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl NoteVisibilityChangedPreviewEventArgs {
pub fn ViewId(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ViewId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsVisible(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsVisible)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for NoteVisibilityChangedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, INoteVisibilityChangedPreviewEventArgs>();
}
unsafe impl windows_core::Interface for NoteVisibilityChangedPreviewEventArgs {
type Vtable = <INoteVisibilityChangedPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <INoteVisibilityChangedPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for NoteVisibilityChangedPreviewEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NoteVisibilityChangedPreviewEventArgs";
}
unsafe impl Send for NoteVisibilityChangedPreviewEventArgs {}
unsafe impl Sync for NoteVisibilityChangedPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct NotesWindowManagerPreview(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(NotesWindowManagerPreview, windows_core::IUnknown, windows_core::IInspectable);
impl NotesWindowManagerPreview {
pub fn IsScreenLocked(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsScreenLocked)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ShowNote(&self, noteviewid: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ShowNote)(windows_core::Interface::as_raw(this), noteviewid).ok() }
}
pub fn ShowNoteRelativeTo(&self, noteviewid: i32, anchornoteviewid: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ShowNoteRelativeTo)(windows_core::Interface::as_raw(this), noteviewid, anchornoteviewid).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn ShowNoteWithPlacement<P1>(&self, noteviewid: i32, data: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<super::super::super::Storage::Streams::IBuffer>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).ShowNoteWithPlacement)(windows_core::Interface::as_raw(this), noteviewid, data.param().abi()).ok() }
}
pub fn HideNote(&self, noteviewid: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).HideNote)(windows_core::Interface::as_raw(this), noteviewid).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn GetNotePlacement(&self, noteviewid: i32) -> windows_core::Result<super::super::super::Storage::Streams::IBuffer> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNotePlacement)(windows_core::Interface::as_raw(this), noteviewid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn TrySetNoteSize(&self, noteviewid: i32, size: super::super::super::Foundation::Size) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TrySetNoteSize)(windows_core::Interface::as_raw(this), noteviewid, size, &mut result__).map(|| result__)
}
}
pub fn SetFocusToNextView(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetFocusToNextView)(windows_core::Interface::as_raw(this)).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn SetNotesThumbnailAsync<P0>(&self, thumbnail: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::super::super::Storage::Streams::IBuffer>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SetNotesThumbnailAsync)(windows_core::Interface::as_raw(this), thumbnail.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SystemLockStateChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<NotesWindowManagerPreview, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SystemLockStateChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveSystemLockStateChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveSystemLockStateChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn NotePlacementChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<NotesWindowManagerPreview, NotePlacementChangedPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NotePlacementChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveNotePlacementChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveNotePlacementChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn NoteVisibilityChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<NotesWindowManagerPreview, NoteVisibilityChangedPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NoteVisibilityChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveNoteVisibilityChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveNoteVisibilityChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn ShowNoteRelativeToWithOptions<P2>(&self, noteviewid: i32, anchornoteviewid: i32, options: P2) -> windows_core::Result<()>
where
P2: windows_core::Param<NotesWindowManagerPreviewShowNoteOptions>,
{
let this = &windows_core::Interface::cast::<INotesWindowManagerPreview2>(self)?;
unsafe { (windows_core::Interface::vtable(this).ShowNoteRelativeToWithOptions)(windows_core::Interface::as_raw(this), noteviewid, anchornoteviewid, options.param().abi()).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn ShowNoteWithPlacementWithOptions<P1, P2>(&self, noteviewid: i32, data: P1, options: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<super::super::super::Storage::Streams::IBuffer>,
P2: windows_core::Param<NotesWindowManagerPreviewShowNoteOptions>,
{
let this = &windows_core::Interface::cast::<INotesWindowManagerPreview2>(self)?;
unsafe { (windows_core::Interface::vtable(this).ShowNoteWithPlacementWithOptions)(windows_core::Interface::as_raw(this), noteviewid, data.param().abi(), options.param().abi()).ok() }
}
pub fn SetFocusToPreviousView(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<INotesWindowManagerPreview2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetFocusToPreviousView)(windows_core::Interface::as_raw(this)).ok() }
}
#[cfg(feature = "Graphics_Imaging")]
pub fn SetThumbnailImageForTaskSwitcherAsync<P0>(&self, bitmap: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::super::super::Graphics::Imaging::SoftwareBitmap>,
{
let this = &windows_core::Interface::cast::<INotesWindowManagerPreview2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SetThumbnailImageForTaskSwitcherAsync)(windows_core::Interface::as_raw(this), bitmap.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetForCurrentApp() -> windows_core::Result<NotesWindowManagerPreview> {
Self::INotesWindowManagerPreviewStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentApp)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn INotesWindowManagerPreviewStatics<R, F: FnOnce(&INotesWindowManagerPreviewStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<NotesWindowManagerPreview, INotesWindowManagerPreviewStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for NotesWindowManagerPreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, INotesWindowManagerPreview>();
}
unsafe impl windows_core::Interface for NotesWindowManagerPreview {
type Vtable = <INotesWindowManagerPreview as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <INotesWindowManagerPreview as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for NotesWindowManagerPreview {
const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview";
}
unsafe impl Send for NotesWindowManagerPreview {}
unsafe impl Sync for NotesWindowManagerPreview {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct NotesWindowManagerPreviewShowNoteOptions(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(NotesWindowManagerPreviewShowNoteOptions, windows_core::IUnknown, windows_core::IInspectable);
impl NotesWindowManagerPreviewShowNoteOptions {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<NotesWindowManagerPreviewShowNoteOptions, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn ShowWithFocus(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowWithFocus)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetShowWithFocus(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetShowWithFocus)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for NotesWindowManagerPreviewShowNoteOptions {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, INotesWindowManagerPreviewShowNoteOptions>();
}
unsafe impl windows_core::Interface for NotesWindowManagerPreviewShowNoteOptions {
type Vtable = <INotesWindowManagerPreviewShowNoteOptions as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <INotesWindowManagerPreviewShowNoteOptions as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for NotesWindowManagerPreviewShowNoteOptions {
const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreviewShowNoteOptions";
}
unsafe impl Send for NotesWindowManagerPreviewShowNoteOptions {}
unsafe impl Sync for NotesWindowManagerPreviewShowNoteOptions {}
@@ -0,0 +1,6 @@
#[cfg(feature = "ApplicationModel_Preview_Holographic")]
pub mod Holographic;
#[cfg(feature = "ApplicationModel_Preview_InkWorkspace")]
pub mod InkWorkspace;
#[cfg(feature = "ApplicationModel_Preview_Notes")]
pub mod Notes;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,228 @@
windows_core::imp::define_interface!(IIndexedResourceCandidate, IIndexedResourceCandidate_Vtbl, 0x0e619ef3_faec_4414_a9d7_54acd5953f29);
impl windows_core::RuntimeType for IIndexedResourceCandidate {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IIndexedResourceCandidate_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Type: unsafe extern "system" fn(*mut core::ffi::c_void, *mut IndexedResourceType) -> windows_core::HRESULT,
pub Uri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Metadata: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Qualifiers: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ValueAsString: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetQualifierValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IIndexedResourceQualifier, IIndexedResourceQualifier_Vtbl, 0xdae3bb9b_d304_497f_a168_a340042c8adb);
impl windows_core::RuntimeType for IIndexedResourceQualifier {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IIndexedResourceQualifier_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub QualifierName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub QualifierValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceIndexer, IResourceIndexer_Vtbl, 0x2d4cf9a5_e32f_4ab2_8748_96350a016da3);
impl windows_core::RuntimeType for IResourceIndexer {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceIndexer_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IndexFilePath: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IndexFileContentsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceIndexerFactory, IResourceIndexerFactory_Vtbl, 0xb8de3f09_31cd_4d97_bd30_8d39f742bc61);
impl windows_core::RuntimeType for IResourceIndexerFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceIndexerFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateResourceIndexer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceIndexerFactory2, IResourceIndexerFactory2_Vtbl, 0x6040f18d_d5e5_4b60_9201_cd279cbcfed9);
impl windows_core::RuntimeType for IResourceIndexerFactory2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceIndexerFactory2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateResourceIndexerWithExtension: 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,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IndexedResourceCandidate(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(IndexedResourceCandidate, windows_core::IUnknown, windows_core::IInspectable);
impl IndexedResourceCandidate {
pub fn Type(&self) -> windows_core::Result<IndexedResourceType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Type)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Uri(&self) -> windows_core::Result<super::super::super::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Uri)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Metadata(&self) -> windows_core::Result<windows_collections::IMapView<windows_core::HSTRING, windows_core::HSTRING>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Metadata)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Qualifiers(&self) -> windows_core::Result<windows_collections::IVectorView<IndexedResourceQualifier>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Qualifiers)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ValueAsString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueAsString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetQualifierValue(&self, qualifiername: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetQualifierValue)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(qualifiername), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for IndexedResourceCandidate {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IIndexedResourceCandidate>();
}
unsafe impl windows_core::Interface for IndexedResourceCandidate {
type Vtable = <IIndexedResourceCandidate as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIndexedResourceCandidate as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IndexedResourceCandidate {
const NAME: &'static str = "Windows.ApplicationModel.Resources.Management.IndexedResourceCandidate";
}
unsafe impl Send for IndexedResourceCandidate {}
unsafe impl Sync for IndexedResourceCandidate {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IndexedResourceQualifier(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(IndexedResourceQualifier, windows_core::IUnknown, windows_core::IInspectable);
impl IndexedResourceQualifier {
pub fn QualifierName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).QualifierName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn QualifierValue(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).QualifierValue)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for IndexedResourceQualifier {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IIndexedResourceQualifier>();
}
unsafe impl windows_core::Interface for IndexedResourceQualifier {
type Vtable = <IIndexedResourceQualifier as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIndexedResourceQualifier as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IndexedResourceQualifier {
const NAME: &'static str = "Windows.ApplicationModel.Resources.Management.IndexedResourceQualifier";
}
unsafe impl Send for IndexedResourceQualifier {}
unsafe impl Sync for IndexedResourceQualifier {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct IndexedResourceType(pub i32);
impl IndexedResourceType {
pub const String: Self = Self(0i32);
pub const Path: Self = Self(1i32);
pub const EmbeddedData: Self = Self(2i32);
}
impl windows_core::TypeKind for IndexedResourceType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for IndexedResourceType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Resources.Management.IndexedResourceType;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ResourceIndexer(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ResourceIndexer, windows_core::IUnknown, windows_core::IInspectable);
impl ResourceIndexer {
pub fn IndexFilePath<P0>(&self, filepath: P0) -> windows_core::Result<IndexedResourceCandidate>
where
P0: windows_core::Param<super::super::super::Foundation::Uri>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IndexFilePath)(windows_core::Interface::as_raw(this), filepath.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IndexFileContentsAsync<P0>(&self, file: P0) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<IndexedResourceCandidate>>>
where
P0: windows_core::Param<super::super::super::Foundation::Uri>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IndexFileContentsAsync)(windows_core::Interface::as_raw(this), file.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn CreateResourceIndexer<P0>(projectroot: P0) -> windows_core::Result<ResourceIndexer>
where
P0: windows_core::Param<super::super::super::Foundation::Uri>,
{
Self::IResourceIndexerFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateResourceIndexer)(windows_core::Interface::as_raw(this), projectroot.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateResourceIndexerWithExtension<P0, P1>(projectroot: P0, extensiondllpath: P1) -> windows_core::Result<ResourceIndexer>
where
P0: windows_core::Param<super::super::super::Foundation::Uri>,
P1: windows_core::Param<super::super::super::Foundation::Uri>,
{
Self::IResourceIndexerFactory2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateResourceIndexerWithExtension)(windows_core::Interface::as_raw(this), projectroot.param().abi(), extensiondllpath.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IResourceIndexerFactory<R, F: FnOnce(&IResourceIndexerFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceIndexer, IResourceIndexerFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IResourceIndexerFactory2<R, F: FnOnce(&IResourceIndexerFactory2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceIndexer, IResourceIndexerFactory2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for ResourceIndexer {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IResourceIndexer>();
}
unsafe impl windows_core::Interface for ResourceIndexer {
type Vtable = <IResourceIndexer as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IResourceIndexer as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ResourceIndexer {
const NAME: &'static str = "Windows.ApplicationModel.Resources.Management.ResourceIndexer";
}
unsafe impl Send for ResourceIndexer {}
unsafe impl Sync for ResourceIndexer {}
@@ -0,0 +1,197 @@
#[cfg(feature = "ApplicationModel_Resources_Core")]
pub mod Core;
#[cfg(feature = "ApplicationModel_Resources_Management")]
pub mod Management;
windows_core::imp::define_interface!(IResourceLoader, IResourceLoader_Vtbl, 0x08524908_16ef_45ad_a602_293637d7e61a);
impl windows_core::RuntimeType for IResourceLoader {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceLoader_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetString: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceLoader2, IResourceLoader2_Vtbl, 0x10eb6ec6_8138_48c1_bc65_e1f14207367c);
impl windows_core::RuntimeType for IResourceLoader2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceLoader2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetStringForUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceLoaderFactory, IResourceLoaderFactory_Vtbl, 0xc33a3603_69dc_4285_a077_d5c0e47ccbe8);
impl windows_core::RuntimeType for IResourceLoaderFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceLoaderFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateResourceLoaderByName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceLoaderStatics, IResourceLoaderStatics_Vtbl, 0xbf777ce1_19c8_49c2_953c_47e9227b334e);
impl windows_core::RuntimeType for IResourceLoaderStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceLoaderStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetStringForReference: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceLoaderStatics2, IResourceLoaderStatics2_Vtbl, 0x0cc04141_6466_4989_9494_0b82dfc53f1f);
impl windows_core::RuntimeType for IResourceLoaderStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceLoaderStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetForCurrentViewWithName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetForViewIndependentUse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetForViewIndependentUseWithName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IResourceLoaderStatics3, IResourceLoaderStatics3_Vtbl, 0x64609dfb_64ac_491b_8100_0e558d61c1d0);
impl windows_core::RuntimeType for IResourceLoaderStatics3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceLoaderStatics3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "UI")]
pub GetForUIContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
GetForUIContext: usize,
}
windows_core::imp::define_interface!(IResourceLoaderStatics4, IResourceLoaderStatics4_Vtbl, 0x9fb36c32_6c8c_4316_962e_909539b5c259);
impl windows_core::RuntimeType for IResourceLoaderStatics4 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceLoaderStatics4_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefaultPriPath: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ResourceLoader(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ResourceLoader, windows_core::IUnknown, windows_core::IInspectable);
impl ResourceLoader {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceLoader, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn GetString(&self, resource: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetString)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(resource), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetStringForUri<P0>(&self, uri: P0) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
let this = &windows_core::Interface::cast::<IResourceLoader2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetStringForUri)(windows_core::Interface::as_raw(this), uri.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn CreateResourceLoaderByName(name: &windows_core::HSTRING) -> windows_core::Result<ResourceLoader> {
Self::IResourceLoaderFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateResourceLoaderByName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetStringForReference<P0>(uri: P0) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
Self::IResourceLoaderStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetStringForReference)(windows_core::Interface::as_raw(this), uri.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetForCurrentView() -> windows_core::Result<ResourceLoader> {
Self::IResourceLoaderStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetForCurrentViewWithName(name: &windows_core::HSTRING) -> windows_core::Result<ResourceLoader> {
Self::IResourceLoaderStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentViewWithName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetForViewIndependentUse() -> windows_core::Result<ResourceLoader> {
Self::IResourceLoaderStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForViewIndependentUse)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetForViewIndependentUseWithName(name: &windows_core::HSTRING) -> windows_core::Result<ResourceLoader> {
Self::IResourceLoaderStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForViewIndependentUseWithName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
#[cfg(feature = "UI")]
pub fn GetForUIContext<P0>(context: P0) -> windows_core::Result<ResourceLoader>
where
P0: windows_core::Param<super::super::UI::UIContext>,
{
Self::IResourceLoaderStatics3(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForUIContext)(windows_core::Interface::as_raw(this), context.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDefaultPriPath(packagefullname: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
Self::IResourceLoaderStatics4(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefaultPriPath)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(packagefullname), &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IResourceLoaderFactory<R, F: FnOnce(&IResourceLoaderFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceLoader, IResourceLoaderFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IResourceLoaderStatics<R, F: FnOnce(&IResourceLoaderStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceLoader, IResourceLoaderStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IResourceLoaderStatics2<R, F: FnOnce(&IResourceLoaderStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceLoader, IResourceLoaderStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IResourceLoaderStatics3<R, F: FnOnce(&IResourceLoaderStatics3) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceLoader, IResourceLoaderStatics3> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IResourceLoaderStatics4<R, F: FnOnce(&IResourceLoaderStatics4) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ResourceLoader, IResourceLoaderStatics4> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for ResourceLoader {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IResourceLoader>();
}
unsafe impl windows_core::Interface for ResourceLoader {
type Vtable = <IResourceLoader as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IResourceLoader as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ResourceLoader {
const NAME: &'static str = "Windows.ApplicationModel.Resources.ResourceLoader";
}
unsafe impl Send for ResourceLoader {}
unsafe impl Sync for ResourceLoader {}
@@ -0,0 +1,319 @@
windows_core::imp::define_interface!(IRequestingFocusOnKeyboardInputEventArgs, IRequestingFocusOnKeyboardInputEventArgs_Vtbl, 0xa1195f27_b1a7_41a2_879d_6a68687e5985);
impl windows_core::RuntimeType for IRequestingFocusOnKeyboardInputEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRequestingFocusOnKeyboardInputEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(ISearchSuggestion, ISearchSuggestion_Vtbl, 0x5b5554b0_1527_437b_95c5_8d18d2b8af55);
impl windows_core::RuntimeType for ISearchSuggestion {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ISearchSuggestion_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Kind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut SearchSuggestionKind) -> windows_core::HRESULT,
pub Text: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Tag: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DetailText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub Image: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
Image: usize,
pub ImageAlternateText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ISearchSuggestionManager, ISearchSuggestionManager_Vtbl, 0x3f0c50a1_cb9d_497b_b500_3c04ac959ad2);
impl windows_core::RuntimeType for ISearchSuggestionManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ISearchSuggestionManager_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SearchHistoryEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetSearchHistoryEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub SearchHistoryContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetSearchHistoryContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetLocalContentSuggestionSettings: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetQueryWithLanguage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetQueryWithSearchQueryLinguisticDetails: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Foundation_Collections")]
pub Suggestions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
Suggestions: usize,
pub AddToHistory: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddToHistoryWithLanguage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ClearHistory: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SuggestionsRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveSuggestionsRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub RequestingFocusOnKeyboardInput: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveRequestingFocusOnKeyboardInput: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ISearchSuggestionsRequestedEventArgs, ISearchSuggestionsRequestedEventArgs_Vtbl, 0x6fd519e5_9e7e_4ab4_8be3_c76b1bd4344a);
impl windows_core::RuntimeType for ISearchSuggestionsRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ISearchSuggestionsRequestedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub QueryText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Language: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub LinguisticDetails: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RequestingFocusOnKeyboardInputEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RequestingFocusOnKeyboardInputEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl RequestingFocusOnKeyboardInputEventArgs {}
impl windows_core::RuntimeType for RequestingFocusOnKeyboardInputEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRequestingFocusOnKeyboardInputEventArgs>();
}
unsafe impl windows_core::Interface for RequestingFocusOnKeyboardInputEventArgs {
type Vtable = <IRequestingFocusOnKeyboardInputEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRequestingFocusOnKeyboardInputEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RequestingFocusOnKeyboardInputEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Search.Core.RequestingFocusOnKeyboardInputEventArgs";
}
unsafe impl Send for RequestingFocusOnKeyboardInputEventArgs {}
unsafe impl Sync for RequestingFocusOnKeyboardInputEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SearchSuggestion(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(SearchSuggestion, windows_core::IUnknown, windows_core::IInspectable);
impl SearchSuggestion {
pub fn Kind(&self) -> windows_core::Result<SearchSuggestionKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Kind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Text(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Text)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Tag(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Tag)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn DetailText(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DetailText)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn Image(&self) -> windows_core::Result<super::super::super::Storage::Streams::IRandomAccessStreamReference> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Image)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ImageAlternateText(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ImageAlternateText)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for SearchSuggestion {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ISearchSuggestion>();
}
unsafe impl windows_core::Interface for SearchSuggestion {
type Vtable = <ISearchSuggestion as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ISearchSuggestion as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for SearchSuggestion {
const NAME: &'static str = "Windows.ApplicationModel.Search.Core.SearchSuggestion";
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct SearchSuggestionKind(pub i32);
impl SearchSuggestionKind {
pub const Query: Self = Self(0i32);
pub const Result: Self = Self(1i32);
pub const Separator: Self = Self(2i32);
}
impl windows_core::TypeKind for SearchSuggestionKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for SearchSuggestionKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Search.Core.SearchSuggestionKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SearchSuggestionManager(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(SearchSuggestionManager, windows_core::IUnknown, windows_core::IInspectable);
impl SearchSuggestionManager {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<SearchSuggestionManager, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn SearchHistoryEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SearchHistoryEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetSearchHistoryEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSearchHistoryEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn SearchHistoryContext(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SearchHistoryContext)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetSearchHistoryContext(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSearchHistoryContext)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn SetLocalContentSuggestionSettings<P0>(&self, settings: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::LocalContentSuggestionSettings>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetLocalContentSuggestionSettings)(windows_core::Interface::as_raw(this), settings.param().abi()).ok() }
}
pub fn SetQuery(&self, querytext: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetQuery)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(querytext)).ok() }
}
pub fn SetQueryWithLanguage(&self, querytext: &windows_core::HSTRING, language: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetQueryWithLanguage)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(querytext), core::mem::transmute_copy(language)).ok() }
}
pub fn SetQueryWithSearchQueryLinguisticDetails<P2>(&self, querytext: &windows_core::HSTRING, language: &windows_core::HSTRING, linguisticdetails: P2) -> windows_core::Result<()>
where
P2: windows_core::Param<super::SearchQueryLinguisticDetails>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetQueryWithSearchQueryLinguisticDetails)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(querytext), core::mem::transmute_copy(language), linguisticdetails.param().abi()).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn Suggestions(&self) -> windows_core::Result<super::super::super::Foundation::Collections::IObservableVector<SearchSuggestion>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Suggestions)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AddToHistory(&self, querytext: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).AddToHistory)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(querytext)).ok() }
}
pub fn AddToHistoryWithLanguage(&self, querytext: &windows_core::HSTRING, language: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).AddToHistoryWithLanguage)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(querytext), core::mem::transmute_copy(language)).ok() }
}
pub fn ClearHistory(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ClearHistory)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn SuggestionsRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<SearchSuggestionManager, SearchSuggestionsRequestedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SuggestionsRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveSuggestionsRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveSuggestionsRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn RequestingFocusOnKeyboardInput<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<SearchSuggestionManager, RequestingFocusOnKeyboardInputEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestingFocusOnKeyboardInput)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveRequestingFocusOnKeyboardInput(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveRequestingFocusOnKeyboardInput)(windows_core::Interface::as_raw(this), token).ok() }
}
}
impl windows_core::RuntimeType for SearchSuggestionManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ISearchSuggestionManager>();
}
unsafe impl windows_core::Interface for SearchSuggestionManager {
type Vtable = <ISearchSuggestionManager as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ISearchSuggestionManager as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for SearchSuggestionManager {
const NAME: &'static str = "Windows.ApplicationModel.Search.Core.SearchSuggestionManager";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SearchSuggestionsRequestedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(SearchSuggestionsRequestedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl SearchSuggestionsRequestedEventArgs {
pub fn QueryText(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).QueryText)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Language(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Language)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn LinguisticDetails(&self) -> windows_core::Result<super::SearchQueryLinguisticDetails> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LinguisticDetails)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Request(&self) -> windows_core::Result<super::SearchSuggestionsRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for SearchSuggestionsRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ISearchSuggestionsRequestedEventArgs>();
}
unsafe impl windows_core::Interface for SearchSuggestionsRequestedEventArgs {
type Vtable = <ISearchSuggestionsRequestedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ISearchSuggestionsRequestedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for SearchSuggestionsRequestedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs";
}
unsafe impl Send for SearchSuggestionsRequestedEventArgs {}
unsafe impl Sync for SearchSuggestionsRequestedEventArgs {}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,39 @@
pub struct CoreUserActivityManager;
impl CoreUserActivityManager {
pub fn CreateUserActivitySessionInBackground<P0>(activity: P0) -> windows_core::Result<super::UserActivitySession>
where
P0: windows_core::Param<super::UserActivity>,
{
Self::ICoreUserActivityManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateUserActivitySessionInBackground)(windows_core::Interface::as_raw(this), activity.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn DeleteUserActivitySessionsInTimeRangeAsync<P0>(channel: P0, starttime: super::super::super::Foundation::DateTime, endtime: super::super::super::Foundation::DateTime) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::UserActivityChannel>,
{
Self::ICoreUserActivityManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteUserActivitySessionsInTimeRangeAsync)(windows_core::Interface::as_raw(this), channel.param().abi(), starttime, endtime, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn ICoreUserActivityManagerStatics<R, F: FnOnce(&ICoreUserActivityManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<CoreUserActivityManager, ICoreUserActivityManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for CoreUserActivityManager {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.Core.CoreUserActivityManager";
}
windows_core::imp::define_interface!(ICoreUserActivityManagerStatics, ICoreUserActivityManagerStatics_Vtbl, 0xca3adb02_a4be_4d4d_bfa8_6795f4264efb);
impl windows_core::RuntimeType for ICoreUserActivityManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICoreUserActivityManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateUserActivitySessionInBackground: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeleteUserActivitySessionsInTimeRangeAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::super::Foundation::DateTime, super::super::super::Foundation::DateTime, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,966 @@
#[cfg(feature = "ApplicationModel_UserActivities_Core")]
pub mod Core;
windows_core::imp::define_interface!(IUserActivity, IUserActivity_Vtbl, 0xfc103e9e_2cab_4d36_aea2_b4bb556cef0f);
impl windows_core::RuntimeType for IUserActivity {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivity_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub State: unsafe extern "system" fn(*mut core::ffi::c_void, *mut UserActivityState) -> windows_core::HRESULT,
pub ActivityId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub VisualElements: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ContentUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetContentUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ContentType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetContentType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FallbackUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetFallbackUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ActivationUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetActivationUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ContentInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetContentInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SaveAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivity2, IUserActivity2_Vtbl, 0x9dc40c62_08c4_47ac_aa9c_2bb2221c55fd);
impl windows_core::RuntimeType for IUserActivity2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivity2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ToJson: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivity3, IUserActivity3_Vtbl, 0xe7697744_e1a2_5147_8e06_55f1eeef271c);
impl windows_core::RuntimeType for IUserActivity3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivity3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsRoamable: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsRoamable: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityAttribution, IUserActivityAttribution_Vtbl, 0x34a5c8b5_86dd_4aec_a491_6a4faea5d22e);
impl windows_core::RuntimeType for IUserActivityAttribution {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityAttribution_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IconUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetIconUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AlternateText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAlternateText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddImageQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetAddImageQuery: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityAttributionFactory, IUserActivityAttributionFactory_Vtbl, 0xe62bd252_c566_4f42_9974_916c4d76377e);
impl windows_core::RuntimeType for IUserActivityAttributionFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityAttributionFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateWithUri: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityChannel, IUserActivityChannel_Vtbl, 0xbac0f8b8_a0e4_483b_b948_9cbabd06070c);
impl windows_core::RuntimeType for IUserActivityChannel {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityChannel_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetOrCreateUserActivityAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeleteActivityAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeleteAllActivitiesAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityChannel2, IUserActivityChannel2_Vtbl, 0x1698e35b_eb7e_4ea0_bf17_a459e8be706c);
impl windows_core::RuntimeType for IUserActivityChannel2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityChannel2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetRecentUserActivitiesAsync: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSessionHistoryItemsForUserActivityAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::DateTime, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityChannelStatics, IUserActivityChannelStatics_Vtbl, 0xc8c005ab_198d_4d80_abb2_c9775ec4a729);
impl windows_core::RuntimeType for IUserActivityChannelStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityChannelStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityChannelStatics2, IUserActivityChannelStatics2_Vtbl, 0x8e87de30_aa4f_4624_9ad0_d40f3ba0317c);
impl windows_core::RuntimeType for IUserActivityChannelStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityChannelStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DisableAutoSessionCreation: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Security_Credentials")]
pub TryGetForWebAccount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Security_Credentials"))]
TryGetForWebAccount: usize,
}
windows_core::imp::define_interface!(IUserActivityChannelStatics3, IUserActivityChannelStatics3_Vtbl, 0x53bc4ddb_bbdf_5984_802a_5305874e205c);
impl windows_core::RuntimeType for IUserActivityChannelStatics3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityChannelStatics3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "System")]
pub GetForUser: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "System"))]
GetForUser: usize,
}
windows_core::imp::define_interface!(IUserActivityContentInfo, IUserActivityContentInfo_Vtbl, 0xb399e5ad_137f_409d_822d_e1af27ce08dc);
impl windows_core::RuntimeType for IUserActivityContentInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IUserActivityContentInfo, windows_core::IUnknown, windows_core::IInspectable);
impl IUserActivityContentInfo {
pub fn ToJson(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ToJson)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeName for IUserActivityContentInfo {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.IUserActivityContentInfo";
}
pub trait IUserActivityContentInfo_Impl: windows_core::IUnknownImpl {
fn ToJson(&self) -> windows_core::Result<windows_core::HSTRING>;
}
impl IUserActivityContentInfo_Vtbl {
pub const fn new<Identity: IUserActivityContentInfo_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ToJson<Identity: IUserActivityContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUserActivityContentInfo_Impl::ToJson(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IUserActivityContentInfo, OFFSET>(), ToJson: ToJson::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUserActivityContentInfo as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityContentInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ToJson: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityContentInfoStatics, IUserActivityContentInfoStatics_Vtbl, 0x9988c34b_0386_4bc9_968a_8200b004144f);
impl windows_core::RuntimeType for IUserActivityContentInfoStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityContentInfoStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FromJson: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityFactory, IUserActivityFactory_Vtbl, 0x7c385758_361d_4a67_8a3b_34ca2978f9a3);
impl windows_core::RuntimeType for IUserActivityFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateWithActivityId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityRequest, IUserActivityRequest_Vtbl, 0xa0ef6355_cf35_4ff0_8833_50cb4b72e06d);
impl windows_core::RuntimeType for IUserActivityRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SetUserActivity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityRequestManager, IUserActivityRequestManager_Vtbl, 0x0c30be4e_903d_48d6_82d4_4043ed57791b);
impl windows_core::RuntimeType for IUserActivityRequestManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityRequestManager_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub UserActivityRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveUserActivityRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityRequestManagerStatics, IUserActivityRequestManagerStatics_Vtbl, 0xc0392df1_224a_432c_81e5_0c76b4c4cefa);
impl windows_core::RuntimeType for IUserActivityRequestManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityRequestManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityRequestedEventArgs, IUserActivityRequestedEventArgs_Vtbl, 0xa4cc7a4c_8229_4cfd_a3bc_c61d318575a4);
impl windows_core::RuntimeType for IUserActivityRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityRequestedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivitySession, IUserActivitySession_Vtbl, 0xae434d78_24fa_44a3_ad48_6eda61aa1924);
impl windows_core::RuntimeType for IUserActivitySession {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivitySession_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ActivityId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivitySessionHistoryItem, IUserActivitySessionHistoryItem_Vtbl, 0xe8d59bd3_3e5d_49fd_98d7_6da97521e255);
impl windows_core::RuntimeType for IUserActivitySessionHistoryItem {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivitySessionHistoryItem_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub UserActivity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub StartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::DateTime) -> windows_core::HRESULT,
pub EndTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityStatics, IUserActivityStatics_Vtbl, 0x8c8fd333_0e09_47f6_9ac7_95cf5c39367b);
impl windows_core::RuntimeType for IUserActivityStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TryParseFromJson: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TryParseFromJsonArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ToJsonArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserActivityVisualElements, IUserActivityVisualElements_Vtbl, 0x94757513_262f_49ef_bbbf_9b75d2e85250);
impl windows_core::RuntimeType for IUserActivityVisualElements {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityVisualElements_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DisplayText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDisplayText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Description: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "UI")]
pub BackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
BackgroundColor: usize,
#[cfg(feature = "UI")]
pub SetBackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetBackgroundColor: usize,
pub Attribution: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAttribution: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "UI_Shell")]
pub SetContent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Shell"))]
SetContent: usize,
#[cfg(feature = "UI_Shell")]
pub Content: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Shell"))]
Content: usize,
}
windows_core::imp::define_interface!(IUserActivityVisualElements2, IUserActivityVisualElements2_Vtbl, 0xcaae7fc7_3eef_4359_825c_9d51b9220de3);
impl windows_core::RuntimeType for IUserActivityVisualElements2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserActivityVisualElements2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AttributionDisplayText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAttributionDisplayText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivity(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivity, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivity {
pub fn State(&self) -> windows_core::Result<UserActivityState> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).State)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ActivityId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActivityId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn VisualElements(&self) -> windows_core::Result<UserActivityVisualElements> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).VisualElements)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ContentUri(&self) -> windows_core::Result<super::super::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContentUri)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetContentUri<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContentUri)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn ContentType(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContentType)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetContentType(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContentType)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn FallbackUri(&self) -> windows_core::Result<super::super::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FallbackUri)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetFallbackUri<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetFallbackUri)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn ActivationUri(&self) -> windows_core::Result<super::super::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActivationUri)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetActivationUri<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetActivationUri)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn ContentInfo(&self) -> windows_core::Result<IUserActivityContentInfo> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContentInfo)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetContentInfo<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IUserActivityContentInfo>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContentInfo)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn SaveAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SaveAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn CreateSession(&self) -> windows_core::Result<UserActivitySession> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateSession)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ToJson(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IUserActivity2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ToJson)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn IsRoamable(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUserActivity3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsRoamable)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsRoamable(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUserActivity3>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIsRoamable)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CreateWithActivityId(activityid: &windows_core::HSTRING) -> windows_core::Result<UserActivity> {
Self::IUserActivityFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWithActivityId)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(activityid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn TryParseFromJson(json: &windows_core::HSTRING) -> windows_core::Result<UserActivity> {
Self::IUserActivityStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryParseFromJson)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(json), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn TryParseFromJsonArray(json: &windows_core::HSTRING) -> windows_core::Result<windows_collections::IVector<UserActivity>> {
Self::IUserActivityStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryParseFromJsonArray)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(json), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ToJsonArray<P0>(activities: P0) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<windows_collections::IIterable<UserActivity>>,
{
Self::IUserActivityStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ToJsonArray)(windows_core::Interface::as_raw(this), activities.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IUserActivityFactory<R, F: FnOnce(&IUserActivityFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivity, IUserActivityFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IUserActivityStatics<R, F: FnOnce(&IUserActivityStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivity, IUserActivityStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for UserActivity {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivity>();
}
unsafe impl windows_core::Interface for UserActivity {
type Vtable = <IUserActivity as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivity as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivity {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivity";
}
unsafe impl Send for UserActivity {}
unsafe impl Sync for UserActivity {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivityAttribution(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivityAttribution, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivityAttribution {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivityAttribution, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn IconUri(&self) -> windows_core::Result<super::super::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IconUri)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetIconUri<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIconUri)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn AlternateText(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AlternateText)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetAlternateText(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAlternateText)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn AddImageQuery(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddImageQuery)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetAddImageQuery(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAddImageQuery)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CreateWithUri<P0>(iconuri: P0) -> windows_core::Result<UserActivityAttribution>
where
P0: windows_core::Param<super::super::Foundation::Uri>,
{
Self::IUserActivityAttributionFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWithUri)(windows_core::Interface::as_raw(this), iconuri.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IUserActivityAttributionFactory<R, F: FnOnce(&IUserActivityAttributionFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivityAttribution, IUserActivityAttributionFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for UserActivityAttribution {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivityAttribution>();
}
unsafe impl windows_core::Interface for UserActivityAttribution {
type Vtable = <IUserActivityAttribution as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivityAttribution as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivityAttribution {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivityAttribution";
}
unsafe impl Send for UserActivityAttribution {}
unsafe impl Sync for UserActivityAttribution {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivityChannel(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivityChannel, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivityChannel {
pub fn GetOrCreateUserActivityAsync(&self, activityid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<UserActivity>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetOrCreateUserActivityAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(activityid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DeleteActivityAsync(&self, activityid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteActivityAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(activityid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DeleteAllActivitiesAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteAllActivitiesAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetRecentUserActivitiesAsync(&self, maxuniqueactivities: i32) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVector<UserActivitySessionHistoryItem>>> {
let this = &windows_core::Interface::cast::<IUserActivityChannel2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetRecentUserActivitiesAsync)(windows_core::Interface::as_raw(this), maxuniqueactivities, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetSessionHistoryItemsForUserActivityAsync(&self, activityid: &windows_core::HSTRING, starttime: super::super::Foundation::DateTime) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVector<UserActivitySessionHistoryItem>>> {
let this = &windows_core::Interface::cast::<IUserActivityChannel2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetSessionHistoryItemsForUserActivityAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(activityid), starttime, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDefault() -> windows_core::Result<UserActivityChannel> {
Self::IUserActivityChannelStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefault)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn DisableAutoSessionCreation() -> windows_core::Result<()> {
Self::IUserActivityChannelStatics2(|this| unsafe { (windows_core::Interface::vtable(this).DisableAutoSessionCreation)(windows_core::Interface::as_raw(this)).ok() })
}
#[cfg(feature = "Security_Credentials")]
pub fn TryGetForWebAccount<P0>(account: P0) -> windows_core::Result<UserActivityChannel>
where
P0: windows_core::Param<super::super::Security::Credentials::WebAccount>,
{
Self::IUserActivityChannelStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryGetForWebAccount)(windows_core::Interface::as_raw(this), account.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
#[cfg(feature = "System")]
pub fn GetForUser<P0>(user: P0) -> windows_core::Result<UserActivityChannel>
where
P0: windows_core::Param<super::super::System::User>,
{
Self::IUserActivityChannelStatics3(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForUser)(windows_core::Interface::as_raw(this), user.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IUserActivityChannelStatics<R, F: FnOnce(&IUserActivityChannelStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivityChannel, IUserActivityChannelStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IUserActivityChannelStatics2<R, F: FnOnce(&IUserActivityChannelStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivityChannel, IUserActivityChannelStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IUserActivityChannelStatics3<R, F: FnOnce(&IUserActivityChannelStatics3) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivityChannel, IUserActivityChannelStatics3> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for UserActivityChannel {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivityChannel>();
}
unsafe impl windows_core::Interface for UserActivityChannel {
type Vtable = <IUserActivityChannel as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivityChannel as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivityChannel {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivityChannel";
}
unsafe impl Send for UserActivityChannel {}
unsafe impl Sync for UserActivityChannel {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivityContentInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivityContentInfo, windows_core::IUnknown, windows_core::IInspectable, IUserActivityContentInfo);
impl UserActivityContentInfo {
pub fn ToJson(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ToJson)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn FromJson(value: &windows_core::HSTRING) -> windows_core::Result<UserActivityContentInfo> {
Self::IUserActivityContentInfoStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromJson)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IUserActivityContentInfoStatics<R, F: FnOnce(&IUserActivityContentInfoStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivityContentInfo, IUserActivityContentInfoStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for UserActivityContentInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivityContentInfo>();
}
unsafe impl windows_core::Interface for UserActivityContentInfo {
type Vtable = <IUserActivityContentInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivityContentInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivityContentInfo {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivityContentInfo";
}
unsafe impl Send for UserActivityContentInfo {}
unsafe impl Sync for UserActivityContentInfo {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivityRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivityRequest, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivityRequest {
pub fn SetUserActivity<P0>(&self, activity: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<UserActivity>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetUserActivity)(windows_core::Interface::as_raw(this), activity.param().abi()).ok() }
}
}
impl windows_core::RuntimeType for UserActivityRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivityRequest>();
}
unsafe impl windows_core::Interface for UserActivityRequest {
type Vtable = <IUserActivityRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivityRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivityRequest {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivityRequest";
}
unsafe impl Send for UserActivityRequest {}
unsafe impl Sync for UserActivityRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivityRequestManager(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivityRequestManager, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivityRequestManager {
pub fn UserActivityRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<UserActivityRequestManager, UserActivityRequestedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UserActivityRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveUserActivityRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveUserActivityRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetForCurrentView() -> windows_core::Result<UserActivityRequestManager> {
Self::IUserActivityRequestManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IUserActivityRequestManagerStatics<R, F: FnOnce(&IUserActivityRequestManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserActivityRequestManager, IUserActivityRequestManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for UserActivityRequestManager {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivityRequestManager>();
}
unsafe impl windows_core::Interface for UserActivityRequestManager {
type Vtable = <IUserActivityRequestManager as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivityRequestManager as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivityRequestManager {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivityRequestManager";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivityRequestedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivityRequestedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivityRequestedEventArgs {
pub fn Request(&self) -> windows_core::Result<UserActivityRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserActivityRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivityRequestedEventArgs>();
}
unsafe impl windows_core::Interface for UserActivityRequestedEventArgs {
type Vtable = <IUserActivityRequestedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivityRequestedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivityRequestedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivityRequestedEventArgs";
}
unsafe impl Send for UserActivityRequestedEventArgs {}
unsafe impl Sync for UserActivityRequestedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivitySession(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivitySession, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(UserActivitySession, super::super::Foundation::IClosable);
impl UserActivitySession {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ActivityId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActivityId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for UserActivitySession {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivitySession>();
}
unsafe impl windows_core::Interface for UserActivitySession {
type Vtable = <IUserActivitySession as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivitySession as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivitySession {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivitySession";
}
unsafe impl Send for UserActivitySession {}
unsafe impl Sync for UserActivitySession {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivitySessionHistoryItem(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivitySessionHistoryItem, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivitySessionHistoryItem {
pub fn UserActivity(&self) -> windows_core::Result<UserActivity> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UserActivity)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StartTime(&self) -> windows_core::Result<super::super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartTime)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn EndTime(&self) -> windows_core::Result<super::super::Foundation::IReference<super::super::Foundation::DateTime>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EndTime)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserActivitySessionHistoryItem {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivitySessionHistoryItem>();
}
unsafe impl windows_core::Interface for UserActivitySessionHistoryItem {
type Vtable = <IUserActivitySessionHistoryItem as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivitySessionHistoryItem as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivitySessionHistoryItem {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivitySessionHistoryItem";
}
unsafe impl Send for UserActivitySessionHistoryItem {}
unsafe impl Sync for UserActivitySessionHistoryItem {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct UserActivityState(pub i32);
impl UserActivityState {
pub const New: Self = Self(0i32);
pub const Published: Self = Self(1i32);
}
impl windows_core::TypeKind for UserActivityState {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for UserActivityState {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserActivities.UserActivityState;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserActivityVisualElements(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserActivityVisualElements, windows_core::IUnknown, windows_core::IInspectable);
impl UserActivityVisualElements {
pub fn DisplayText(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayText)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDisplayText(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDisplayText)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn Description(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Description)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDescription(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDescription)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
#[cfg(feature = "UI")]
pub fn BackgroundColor(&self) -> windows_core::Result<super::super::UI::Color> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BackgroundColor)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "UI")]
pub fn SetBackgroundColor(&self, value: super::super::UI::Color) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetBackgroundColor)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Attribution(&self) -> windows_core::Result<UserActivityAttribution> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Attribution)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetAttribution<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<UserActivityAttribution>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAttribution)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
#[cfg(feature = "UI_Shell")]
pub fn SetContent<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::UI::Shell::IAdaptiveCard>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContent)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
#[cfg(feature = "UI_Shell")]
pub fn Content(&self) -> windows_core::Result<super::super::UI::Shell::IAdaptiveCard> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Content)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AttributionDisplayText(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IUserActivityVisualElements2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AttributionDisplayText)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetAttributionDisplayText(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUserActivityVisualElements2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAttributionDisplayText)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
}
impl windows_core::RuntimeType for UserActivityVisualElements {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserActivityVisualElements>();
}
unsafe impl windows_core::Interface for UserActivityVisualElements {
type Vtable = <IUserActivityVisualElements as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserActivityVisualElements as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserActivityVisualElements {
const NAME: &'static str = "Windows.ApplicationModel.UserActivities.UserActivityVisualElements";
}
unsafe impl Send for UserActivityVisualElements {}
unsafe impl Sync for UserActivityVisualElements {}
@@ -0,0 +1,276 @@
windows_core::imp::define_interface!(IUserDataAccountPartnerAccountInfo, IUserDataAccountPartnerAccountInfo_Vtbl, 0x5f200037_f6ef_4ec3_8630_012c59c1149f);
impl windows_core::RuntimeType for IUserDataAccountPartnerAccountInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountPartnerAccountInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Priority: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AccountKind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut UserDataAccountProviderPartnerAccountKind) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountProviderAddAccountOperation, IUserDataAccountProviderAddAccountOperation_Vtbl, 0xb9c72530_3f84_4b5d_8eaa_45e97aa842ed);
impl windows_core::RuntimeType for IUserDataAccountProviderAddAccountOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountProviderAddAccountOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ContentKinds: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::UserDataAccountContentKinds) -> windows_core::HRESULT,
pub PartnerAccountInfos: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountProviderOperation, IUserDataAccountProviderOperation_Vtbl, 0xa20aad63_888c_4a62_a3dd_34d07a802b2b);
impl windows_core::RuntimeType for IUserDataAccountProviderOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IUserDataAccountProviderOperation, windows_core::IUnknown, windows_core::IInspectable);
impl IUserDataAccountProviderOperation {
pub fn Kind(&self) -> windows_core::Result<UserDataAccountProviderOperationKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Kind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeName for IUserDataAccountProviderOperation {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.Provider.IUserDataAccountProviderOperation";
}
pub trait IUserDataAccountProviderOperation_Impl: windows_core::IUnknownImpl {
fn Kind(&self) -> windows_core::Result<UserDataAccountProviderOperationKind>;
}
impl IUserDataAccountProviderOperation_Vtbl {
pub const fn new<Identity: IUserDataAccountProviderOperation_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Kind<Identity: IUserDataAccountProviderOperation_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut UserDataAccountProviderOperationKind) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUserDataAccountProviderOperation_Impl::Kind(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IUserDataAccountProviderOperation, OFFSET>(), Kind: Kind::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUserDataAccountProviderOperation as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountProviderOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Kind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut UserDataAccountProviderOperationKind) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountProviderResolveErrorsOperation, IUserDataAccountProviderResolveErrorsOperation_Vtbl, 0x6235dc15_bfcb_41e1_9957_9759a28846cc);
impl windows_core::RuntimeType for IUserDataAccountProviderResolveErrorsOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountProviderResolveErrorsOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub UserDataAccountId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompleted: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountProviderSettingsOperation, IUserDataAccountProviderSettingsOperation_Vtbl, 0x92034db7_8648_4f30_acfa_3002658ca80d);
impl windows_core::RuntimeType for IUserDataAccountProviderSettingsOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountProviderSettingsOperation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub UserDataAccountId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompleted: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccountPartnerAccountInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccountPartnerAccountInfo, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataAccountPartnerAccountInfo {
pub fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Priority(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Priority)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn AccountKind(&self) -> windows_core::Result<UserDataAccountProviderPartnerAccountKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccountKind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for UserDataAccountPartnerAccountInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccountPartnerAccountInfo>();
}
unsafe impl windows_core::Interface for UserDataAccountPartnerAccountInfo {
type Vtable = <IUserDataAccountPartnerAccountInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccountPartnerAccountInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccountPartnerAccountInfo {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.Provider.UserDataAccountPartnerAccountInfo";
}
unsafe impl Send for UserDataAccountPartnerAccountInfo {}
unsafe impl Sync for UserDataAccountPartnerAccountInfo {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccountProviderAddAccountOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccountProviderAddAccountOperation, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(UserDataAccountProviderAddAccountOperation, IUserDataAccountProviderOperation);
impl UserDataAccountProviderAddAccountOperation {
pub fn ContentKinds(&self) -> windows_core::Result<super::UserDataAccountContentKinds> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContentKinds)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PartnerAccountInfos(&self) -> windows_core::Result<windows_collections::IVectorView<UserDataAccountPartnerAccountInfo>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PartnerAccountInfos)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportCompleted(&self, userdataaccountid: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompleted)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(userdataaccountid)).ok() }
}
pub fn Kind(&self) -> windows_core::Result<UserDataAccountProviderOperationKind> {
let this = &windows_core::Interface::cast::<IUserDataAccountProviderOperation>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Kind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for UserDataAccountProviderAddAccountOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccountProviderAddAccountOperation>();
}
unsafe impl windows_core::Interface for UserDataAccountProviderAddAccountOperation {
type Vtable = <IUserDataAccountProviderAddAccountOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccountProviderAddAccountOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccountProviderAddAccountOperation {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.Provider.UserDataAccountProviderAddAccountOperation";
}
unsafe impl Send for UserDataAccountProviderAddAccountOperation {}
unsafe impl Sync for UserDataAccountProviderAddAccountOperation {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct UserDataAccountProviderOperationKind(pub i32);
impl UserDataAccountProviderOperationKind {
pub const AddAccount: Self = Self(0i32);
pub const Settings: Self = Self(1i32);
pub const ResolveErrors: Self = Self(2i32);
}
impl windows_core::TypeKind for UserDataAccountProviderOperationKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for UserDataAccountProviderOperationKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.Provider.UserDataAccountProviderOperationKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct UserDataAccountProviderPartnerAccountKind(pub i32);
impl UserDataAccountProviderPartnerAccountKind {
pub const Exchange: Self = Self(0i32);
pub const PopOrImap: Self = Self(1i32);
}
impl windows_core::TypeKind for UserDataAccountProviderPartnerAccountKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for UserDataAccountProviderPartnerAccountKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.Provider.UserDataAccountProviderPartnerAccountKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccountProviderResolveErrorsOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccountProviderResolveErrorsOperation, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(UserDataAccountProviderResolveErrorsOperation, IUserDataAccountProviderOperation);
impl UserDataAccountProviderResolveErrorsOperation {
pub fn Kind(&self) -> windows_core::Result<UserDataAccountProviderOperationKind> {
let this = &windows_core::Interface::cast::<IUserDataAccountProviderOperation>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Kind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn UserDataAccountId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UserDataAccountId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompleted(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompleted)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for UserDataAccountProviderResolveErrorsOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccountProviderResolveErrorsOperation>();
}
unsafe impl windows_core::Interface for UserDataAccountProviderResolveErrorsOperation {
type Vtable = <IUserDataAccountProviderResolveErrorsOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccountProviderResolveErrorsOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccountProviderResolveErrorsOperation {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.Provider.UserDataAccountProviderResolveErrorsOperation";
}
unsafe impl Send for UserDataAccountProviderResolveErrorsOperation {}
unsafe impl Sync for UserDataAccountProviderResolveErrorsOperation {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccountProviderSettingsOperation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccountProviderSettingsOperation, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(UserDataAccountProviderSettingsOperation, IUserDataAccountProviderOperation);
impl UserDataAccountProviderSettingsOperation {
pub fn Kind(&self) -> windows_core::Result<UserDataAccountProviderOperationKind> {
let this = &windows_core::Interface::cast::<IUserDataAccountProviderOperation>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Kind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn UserDataAccountId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UserDataAccountId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompleted(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReportCompleted)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for UserDataAccountProviderSettingsOperation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccountProviderSettingsOperation>();
}
unsafe impl windows_core::Interface for UserDataAccountProviderSettingsOperation {
type Vtable = <IUserDataAccountProviderSettingsOperation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccountProviderSettingsOperation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccountProviderSettingsOperation {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.Provider.UserDataAccountProviderSettingsOperation";
}
unsafe impl Send for UserDataAccountProviderSettingsOperation {}
unsafe impl Sync for UserDataAccountProviderSettingsOperation {}
@@ -0,0 +1,798 @@
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceAccountAuthenticationType(pub i32);
impl DeviceAccountAuthenticationType {
pub const Basic: Self = Self(0i32);
pub const OAuth: Self = Self(1i32);
pub const SingleSignOn: Self = Self(2i32);
}
impl windows_core::TypeKind for DeviceAccountAuthenticationType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DeviceAccountAuthenticationType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.SystemAccess.DeviceAccountAuthenticationType;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DeviceAccountConfiguration(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(DeviceAccountConfiguration, windows_core::IUnknown, windows_core::IInspectable);
impl DeviceAccountConfiguration {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<DeviceAccountConfiguration, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn AccountName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccountName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetAccountName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAccountName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn DeviceAccountTypeId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceAccountTypeId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDeviceAccountTypeId(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDeviceAccountTypeId)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn ServerType(&self) -> windows_core::Result<DeviceAccountServerType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ServerType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetServerType(&self, value: DeviceAccountServerType) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetServerType)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn EmailAddress(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EmailAddress)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetEmailAddress(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetEmailAddress)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn Domain(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Domain)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDomain(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDomain)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn EmailSyncEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EmailSyncEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetEmailSyncEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetEmailSyncEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn ContactsSyncEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContactsSyncEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetContactsSyncEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContactsSyncEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CalendarSyncEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CalendarSyncEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetCalendarSyncEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetCalendarSyncEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IncomingServerAddress(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IncomingServerAddress)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetIncomingServerAddress(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIncomingServerAddress)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn IncomingServerPort(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IncomingServerPort)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIncomingServerPort(&self, value: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIncomingServerPort)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IncomingServerRequiresSsl(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IncomingServerRequiresSsl)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIncomingServerRequiresSsl(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIncomingServerRequiresSsl)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IncomingServerUsername(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IncomingServerUsername)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetIncomingServerUsername(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIncomingServerUsername)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn OutgoingServerAddress(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutgoingServerAddress)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetOutgoingServerAddress(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetOutgoingServerAddress)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn OutgoingServerPort(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutgoingServerPort)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetOutgoingServerPort(&self, value: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetOutgoingServerPort)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn OutgoingServerRequiresSsl(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutgoingServerRequiresSsl)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetOutgoingServerRequiresSsl(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetOutgoingServerRequiresSsl)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn OutgoingServerUsername(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutgoingServerUsername)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetOutgoingServerUsername(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetOutgoingServerUsername)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
#[cfg(feature = "Security_Credentials")]
pub fn IncomingServerCredential(&self) -> windows_core::Result<super::super::super::Security::Credentials::PasswordCredential> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IncomingServerCredential)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Security_Credentials")]
pub fn SetIncomingServerCredential<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Security::Credentials::PasswordCredential>,
{
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIncomingServerCredential)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
#[cfg(feature = "Security_Credentials")]
pub fn OutgoingServerCredential(&self) -> windows_core::Result<super::super::super::Security::Credentials::PasswordCredential> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutgoingServerCredential)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Security_Credentials")]
pub fn SetOutgoingServerCredential<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Security::Credentials::PasswordCredential>,
{
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetOutgoingServerCredential)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn OAuthRefreshToken(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OAuthRefreshToken)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetOAuthRefreshToken(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetOAuthRefreshToken)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn IsExternallyManaged(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsExternallyManaged)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsExternallyManaged(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIsExternallyManaged)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn AccountIconId(&self) -> windows_core::Result<DeviceAccountIconId> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccountIconId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetAccountIconId(&self, value: DeviceAccountIconId) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAccountIconId)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn AuthenticationType(&self) -> windows_core::Result<DeviceAccountAuthenticationType> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AuthenticationType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetAuthenticationType(&self, value: DeviceAccountAuthenticationType) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAuthenticationType)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsSsoAuthenticationSupported(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsSsoAuthenticationSupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SsoAccountId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SsoAccountId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetSsoAccountId(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetSsoAccountId)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn AlwaysDownloadFullMessage(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AlwaysDownloadFullMessage)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetAlwaysDownloadFullMessage(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAlwaysDownloadFullMessage)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn DoesPolicyAllowMailSync(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DoesPolicyAllowMailSync)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SyncScheduleKind(&self) -> windows_core::Result<DeviceAccountSyncScheduleKind> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SyncScheduleKind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetSyncScheduleKind(&self, value: DeviceAccountSyncScheduleKind) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetSyncScheduleKind)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn MailAgeFilter(&self) -> windows_core::Result<DeviceAccountMailAgeFilter> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MailAgeFilter)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetMailAgeFilter(&self, value: DeviceAccountMailAgeFilter) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetMailAgeFilter)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsClientAuthenticationCertificateRequired(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsClientAuthenticationCertificateRequired)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsClientAuthenticationCertificateRequired(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIsClientAuthenticationCertificateRequired)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn AutoSelectAuthenticationCertificate(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AutoSelectAuthenticationCertificate)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetAutoSelectAuthenticationCertificate(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAutoSelectAuthenticationCertificate)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn AuthenticationCertificateId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AuthenticationCertificateId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetAuthenticationCertificateId(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAuthenticationCertificateId)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn CardDavSyncScheduleKind(&self) -> windows_core::Result<DeviceAccountSyncScheduleKind> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CardDavSyncScheduleKind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetCardDavSyncScheduleKind(&self, value: DeviceAccountSyncScheduleKind) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetCardDavSyncScheduleKind)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CalDavSyncScheduleKind(&self) -> windows_core::Result<DeviceAccountSyncScheduleKind> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CalDavSyncScheduleKind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetCalDavSyncScheduleKind(&self, value: DeviceAccountSyncScheduleKind) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetCalDavSyncScheduleKind)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CardDavServerUrl(&self) -> windows_core::Result<super::super::super::Foundation::Uri> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CardDavServerUrl)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetCardDavServerUrl<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Foundation::Uri>,
{
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetCardDavServerUrl)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn CardDavRequiresSsl(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CardDavRequiresSsl)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetCardDavRequiresSsl(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetCardDavRequiresSsl)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CalDavServerUrl(&self) -> windows_core::Result<super::super::super::Foundation::Uri> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CalDavServerUrl)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetCalDavServerUrl<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Foundation::Uri>,
{
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetCalDavServerUrl)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn CalDavRequiresSsl(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CalDavRequiresSsl)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetCalDavRequiresSsl(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetCalDavRequiresSsl)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn WasModifiedByUser(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WasModifiedByUser)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetWasModifiedByUser(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetWasModifiedByUser)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn WasIncomingServerCertificateHashConfirmed(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WasIncomingServerCertificateHashConfirmed)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetWasIncomingServerCertificateHashConfirmed(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetWasIncomingServerCertificateHashConfirmed)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IncomingServerCertificateHash(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IncomingServerCertificateHash)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetIncomingServerCertificateHash(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIncomingServerCertificateHash)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn IsOutgoingServerAuthenticationRequired(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsOutgoingServerAuthenticationRequired)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsOutgoingServerAuthenticationRequired(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIsOutgoingServerAuthenticationRequired)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsOutgoingServerAuthenticationEnabled(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsOutgoingServerAuthenticationEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsOutgoingServerAuthenticationEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIsOutgoingServerAuthenticationEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn WasOutgoingServerCertificateHashConfirmed(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WasOutgoingServerCertificateHashConfirmed)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetWasOutgoingServerCertificateHashConfirmed(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetWasOutgoingServerCertificateHashConfirmed)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn OutgoingServerCertificateHash(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutgoingServerCertificateHash)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetOutgoingServerCertificateHash(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetOutgoingServerCertificateHash)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn IsSyncScheduleManagedBySystem(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsSyncScheduleManagedBySystem)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsSyncScheduleManagedBySystem(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDeviceAccountConfiguration2>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIsSyncScheduleManagedBySystem)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for DeviceAccountConfiguration {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IDeviceAccountConfiguration>();
}
unsafe impl windows_core::Interface for DeviceAccountConfiguration {
type Vtable = <IDeviceAccountConfiguration as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IDeviceAccountConfiguration as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for DeviceAccountConfiguration {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.SystemAccess.DeviceAccountConfiguration";
}
unsafe impl Send for DeviceAccountConfiguration {}
unsafe impl Sync for DeviceAccountConfiguration {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceAccountIconId(pub i32);
impl DeviceAccountIconId {
pub const Exchange: Self = Self(0i32);
pub const Msa: Self = Self(1i32);
pub const Outlook: Self = Self(2i32);
pub const Generic: Self = Self(3i32);
}
impl windows_core::TypeKind for DeviceAccountIconId {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DeviceAccountIconId {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.SystemAccess.DeviceAccountIconId;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceAccountMailAgeFilter(pub i32);
impl DeviceAccountMailAgeFilter {
pub const All: Self = Self(0i32);
pub const Last1Day: Self = Self(1i32);
pub const Last3Days: Self = Self(2i32);
pub const Last7Days: Self = Self(3i32);
pub const Last14Days: Self = Self(4i32);
pub const Last30Days: Self = Self(5i32);
pub const Last90Days: Self = Self(6i32);
}
impl windows_core::TypeKind for DeviceAccountMailAgeFilter {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DeviceAccountMailAgeFilter {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.SystemAccess.DeviceAccountMailAgeFilter;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceAccountServerType(pub i32);
impl DeviceAccountServerType {
pub const Exchange: Self = Self(0i32);
pub const Pop: Self = Self(1i32);
pub const Imap: Self = Self(2i32);
}
impl windows_core::TypeKind for DeviceAccountServerType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DeviceAccountServerType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.SystemAccess.DeviceAccountServerType;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceAccountSyncScheduleKind(pub i32);
impl DeviceAccountSyncScheduleKind {
pub const Manual: Self = Self(0i32);
pub const Every15Minutes: Self = Self(1i32);
pub const Every30Minutes: Self = Self(2i32);
pub const Every60Minutes: Self = Self(3i32);
pub const Every2Hours: Self = Self(4i32);
pub const Daily: Self = Self(5i32);
pub const AsItemsArrive: Self = Self(6i32);
}
impl windows_core::TypeKind for DeviceAccountSyncScheduleKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DeviceAccountSyncScheduleKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.SystemAccess.DeviceAccountSyncScheduleKind;i4)");
}
windows_core::imp::define_interface!(IDeviceAccountConfiguration, IDeviceAccountConfiguration_Vtbl, 0xad0123a3_fbdc_4d1b_be43_5a27ea4a1b63);
impl windows_core::RuntimeType for IDeviceAccountConfiguration {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IDeviceAccountConfiguration_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AccountName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAccountName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeviceAccountTypeId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDeviceAccountTypeId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ServerType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DeviceAccountServerType) -> windows_core::HRESULT,
pub SetServerType: unsafe extern "system" fn(*mut core::ffi::c_void, DeviceAccountServerType) -> windows_core::HRESULT,
pub EmailAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetEmailAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Domain: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDomain: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EmailSyncEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetEmailSyncEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub ContactsSyncEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetContactsSyncEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub CalendarSyncEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetCalendarSyncEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IncomingServerAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetIncomingServerAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IncomingServerPort: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SetIncomingServerPort: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub IncomingServerRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIncomingServerRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IncomingServerUsername: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetIncomingServerUsername: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub OutgoingServerAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetOutgoingServerAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub OutgoingServerPort: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SetOutgoingServerPort: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub OutgoingServerRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetOutgoingServerRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub OutgoingServerUsername: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetOutgoingServerUsername: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IDeviceAccountConfiguration2, IDeviceAccountConfiguration2_Vtbl, 0xf2b2e5a6_728d_4a4a_8945_2bf8580136de);
impl windows_core::RuntimeType for IDeviceAccountConfiguration2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IDeviceAccountConfiguration2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Security_Credentials")]
pub IncomingServerCredential: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Security_Credentials"))]
IncomingServerCredential: usize,
#[cfg(feature = "Security_Credentials")]
pub SetIncomingServerCredential: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Security_Credentials"))]
SetIncomingServerCredential: usize,
#[cfg(feature = "Security_Credentials")]
pub OutgoingServerCredential: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Security_Credentials"))]
OutgoingServerCredential: usize,
#[cfg(feature = "Security_Credentials")]
pub SetOutgoingServerCredential: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Security_Credentials"))]
SetOutgoingServerCredential: usize,
pub OAuthRefreshToken: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetOAuthRefreshToken: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsExternallyManaged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsExternallyManaged: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub AccountIconId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DeviceAccountIconId) -> windows_core::HRESULT,
pub SetAccountIconId: unsafe extern "system" fn(*mut core::ffi::c_void, DeviceAccountIconId) -> windows_core::HRESULT,
pub AuthenticationType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DeviceAccountAuthenticationType) -> windows_core::HRESULT,
pub SetAuthenticationType: unsafe extern "system" fn(*mut core::ffi::c_void, DeviceAccountAuthenticationType) -> windows_core::HRESULT,
pub IsSsoAuthenticationSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SsoAccountId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetSsoAccountId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AlwaysDownloadFullMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetAlwaysDownloadFullMessage: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub DoesPolicyAllowMailSync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SyncScheduleKind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DeviceAccountSyncScheduleKind) -> windows_core::HRESULT,
pub SetSyncScheduleKind: unsafe extern "system" fn(*mut core::ffi::c_void, DeviceAccountSyncScheduleKind) -> windows_core::HRESULT,
pub MailAgeFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DeviceAccountMailAgeFilter) -> windows_core::HRESULT,
pub SetMailAgeFilter: unsafe extern "system" fn(*mut core::ffi::c_void, DeviceAccountMailAgeFilter) -> windows_core::HRESULT,
pub IsClientAuthenticationCertificateRequired: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsClientAuthenticationCertificateRequired: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub AutoSelectAuthenticationCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetAutoSelectAuthenticationCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub AuthenticationCertificateId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAuthenticationCertificateId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CardDavSyncScheduleKind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DeviceAccountSyncScheduleKind) -> windows_core::HRESULT,
pub SetCardDavSyncScheduleKind: unsafe extern "system" fn(*mut core::ffi::c_void, DeviceAccountSyncScheduleKind) -> windows_core::HRESULT,
pub CalDavSyncScheduleKind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DeviceAccountSyncScheduleKind) -> windows_core::HRESULT,
pub SetCalDavSyncScheduleKind: unsafe extern "system" fn(*mut core::ffi::c_void, DeviceAccountSyncScheduleKind) -> windows_core::HRESULT,
pub CardDavServerUrl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCardDavServerUrl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CardDavRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetCardDavRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub CalDavServerUrl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCalDavServerUrl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CalDavRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetCalDavRequiresSsl: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub WasModifiedByUser: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetWasModifiedByUser: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub WasIncomingServerCertificateHashConfirmed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetWasIncomingServerCertificateHashConfirmed: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IncomingServerCertificateHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetIncomingServerCertificateHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsOutgoingServerAuthenticationRequired: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsOutgoingServerAuthenticationRequired: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsOutgoingServerAuthenticationEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsOutgoingServerAuthenticationEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub WasOutgoingServerCertificateHashConfirmed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetWasOutgoingServerCertificateHashConfirmed: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub OutgoingServerCertificateHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetOutgoingServerCertificateHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsSyncScheduleManagedBySystem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsSyncScheduleManagedBySystem: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountSystemAccessManagerStatics, IUserDataAccountSystemAccessManagerStatics_Vtbl, 0x9d6b11b9_cbe5_45f5_822b_c267b81dbdb6);
impl windows_core::RuntimeType for IUserDataAccountSystemAccessManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountSystemAccessManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AddAndShowDeviceAccountsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountSystemAccessManagerStatics2, IUserDataAccountSystemAccessManagerStatics2_Vtbl, 0x943f854d_4b4e_439f_83d3_979b27c05ac7);
impl windows_core::RuntimeType for IUserDataAccountSystemAccessManagerStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountSystemAccessManagerStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SuppressLocalAccountWithAccountAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateDeviceAccountAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeleteDeviceAccountAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceAccountConfigurationAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub struct UserDataAccountSystemAccessManager;
impl UserDataAccountSystemAccessManager {
pub fn AddAndShowDeviceAccountsAsync<P0>(accounts: P0) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<windows_core::HSTRING>>>
where
P0: windows_core::Param<windows_collections::IIterable<DeviceAccountConfiguration>>,
{
Self::IUserDataAccountSystemAccessManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddAndShowDeviceAccountsAsync)(windows_core::Interface::as_raw(this), accounts.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn SuppressLocalAccountWithAccountAsync(userdataaccountid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncAction> {
Self::IUserDataAccountSystemAccessManagerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SuppressLocalAccountWithAccountAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(userdataaccountid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateDeviceAccountAsync<P0>(account: P0) -> windows_core::Result<windows_future::IAsyncOperation<windows_core::HSTRING>>
where
P0: windows_core::Param<DeviceAccountConfiguration>,
{
Self::IUserDataAccountSystemAccessManagerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateDeviceAccountAsync)(windows_core::Interface::as_raw(this), account.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn DeleteDeviceAccountAsync(accountid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncAction> {
Self::IUserDataAccountSystemAccessManagerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteDeviceAccountAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(accountid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDeviceAccountConfigurationAsync(accountid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<DeviceAccountConfiguration>> {
Self::IUserDataAccountSystemAccessManagerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceAccountConfigurationAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(accountid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IUserDataAccountSystemAccessManagerStatics<R, F: FnOnce(&IUserDataAccountSystemAccessManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserDataAccountSystemAccessManager, IUserDataAccountSystemAccessManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IUserDataAccountSystemAccessManagerStatics2<R, F: FnOnce(&IUserDataAccountSystemAccessManagerStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserDataAccountSystemAccessManager, IUserDataAccountSystemAccessManagerStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for UserDataAccountSystemAccessManager {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.SystemAccess.UserDataAccountSystemAccessManager";
}
@@ -0,0 +1,626 @@
#[cfg(feature = "ApplicationModel_UserDataAccounts_Provider")]
pub mod Provider;
#[cfg(feature = "ApplicationModel_UserDataAccounts_SystemAccess")]
pub mod SystemAccess;
windows_core::imp::define_interface!(IUserDataAccount, IUserDataAccount_Vtbl, 0xb9c4367e_b348_4910_be94_4ad4bba6dea7);
impl windows_core::RuntimeType for IUserDataAccount {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccount_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UserDisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetUserDisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub OtherAppReadAccess: unsafe extern "system" fn(*mut core::ffi::c_void, *mut UserDataAccountOtherAppReadAccess) -> windows_core::HRESULT,
pub SetOtherAppReadAccess: unsafe extern "system" fn(*mut core::ffi::c_void, UserDataAccountOtherAppReadAccess) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub Icon: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
Icon: usize,
pub DeviceAccountTypeId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PackageFamilyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SaveAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeleteAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "ApplicationModel_Appointments")]
pub FindAppointmentCalendarsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_Appointments"))]
FindAppointmentCalendarsAsync: usize,
#[cfg(feature = "ApplicationModel_Email")]
pub FindEmailMailboxesAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_Email"))]
FindEmailMailboxesAsync: usize,
#[cfg(feature = "ApplicationModel_Contacts")]
pub FindContactListsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_Contacts"))]
FindContactListsAsync: usize,
#[cfg(feature = "ApplicationModel_Contacts")]
pub FindContactAnnotationListsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_Contacts"))]
FindContactAnnotationListsAsync: usize,
}
windows_core::imp::define_interface!(IUserDataAccount2, IUserDataAccount2_Vtbl, 0x078cd89f_de82_404b_8195_c8a3ac198f60);
impl windows_core::RuntimeType for IUserDataAccount2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccount2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub EnterpriseId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsProtectedUnderLock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccount3, IUserDataAccount3_Vtbl, 0x01533845_6c43_4286_9d69_3e1709a1f266);
impl windows_core::RuntimeType for IUserDataAccount3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccount3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ExplictReadAccessPackageFamilyNames: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccount4, IUserDataAccount4_Vtbl, 0xc4315210_eae5_4f0a_a8b2_1cca115e008f);
impl windows_core::RuntimeType for IUserDataAccount4 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccount4_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CanShowCreateContactGroup: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetCanShowCreateContactGroup: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
#[cfg(feature = "Foundation_Collections")]
pub ProviderProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Foundation_Collections"))]
ProviderProperties: usize,
#[cfg(feature = "ApplicationModel_UserDataTasks")]
pub FindUserDataTaskListsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_UserDataTasks"))]
FindUserDataTaskListsAsync: usize,
#[cfg(feature = "ApplicationModel_Contacts")]
pub FindContactGroupsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_Contacts"))]
FindContactGroupsAsync: usize,
pub TryShowCreateContactGroupAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetIsProtectedUnderLock: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub SetIcon: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SetIcon: usize,
}
windows_core::imp::define_interface!(IUserDataAccountManagerForUser, IUserDataAccountManagerForUser_Vtbl, 0x56a6e8db_db8f_41ab_a65f_8c5971aac982);
impl windows_core::RuntimeType for IUserDataAccountManagerForUser {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountManagerForUser_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestStoreAsync: unsafe extern "system" fn(*mut core::ffi::c_void, UserDataAccountStoreAccessType, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "System")]
pub User: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "System"))]
User: usize,
}
windows_core::imp::define_interface!(IUserDataAccountManagerStatics, IUserDataAccountManagerStatics_Vtbl, 0x0d9b89ea_1928_4a20_86d5_3c737f7dc3b0);
impl windows_core::RuntimeType for IUserDataAccountManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestStoreAsync: unsafe extern "system" fn(*mut core::ffi::c_void, UserDataAccountStoreAccessType, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ShowAddAccountAsync: unsafe extern "system" fn(*mut core::ffi::c_void, UserDataAccountContentKinds, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ShowAccountSettingsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ShowAccountErrorResolverAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountManagerStatics2, IUserDataAccountManagerStatics2_Vtbl, 0x6a3ded88_316b_435e_b534_f7d4b4b7dba6);
impl windows_core::RuntimeType for IUserDataAccountManagerStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountManagerStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "System")]
pub GetForUser: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "System"))]
GetForUser: usize,
}
windows_core::imp::define_interface!(IUserDataAccountStore, IUserDataAccountStore_Vtbl, 0x2073b0ad_7d0a_4e76_bf45_2368f978a59a);
impl windows_core::RuntimeType for IUserDataAccountStore {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountStore_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FindAccountsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetAccountAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateAccountAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountStore2, IUserDataAccountStore2_Vtbl, 0xb1e0aef7_9560_4631_8af0_061d30161469);
impl windows_core::RuntimeType for IUserDataAccountStore2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountStore2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateAccountWithPackageRelativeAppIdAsync: 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,
pub StoreChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveStoreChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountStore3, IUserDataAccountStore3_Vtbl, 0x8142c094_f3c9_478b_b117_6585bebb6789);
impl windows_core::RuntimeType for IUserDataAccountStore3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountStore3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateAccountWithPackageRelativeAppIdAndEnterpriseIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataAccountStoreChangedEventArgs, IUserDataAccountStoreChangedEventArgs_Vtbl, 0x84e3e2e5_8820_4512_b1f6_2e035be1072c);
impl windows_core::RuntimeType for IUserDataAccountStoreChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataAccountStoreChangedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccount(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccount, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataAccount {
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn UserDisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UserDisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetUserDisplayName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetUserDisplayName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn OtherAppReadAccess(&self) -> windows_core::Result<UserDataAccountOtherAppReadAccess> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OtherAppReadAccess)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetOtherAppReadAccess(&self, value: UserDataAccountOtherAppReadAccess) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetOtherAppReadAccess)(windows_core::Interface::as_raw(this), value).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn Icon(&self) -> windows_core::Result<super::super::Storage::Streams::IRandomAccessStreamReference> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Icon)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DeviceAccountTypeId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceAccountTypeId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn PackageFamilyName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PackageFamilyName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SaveAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SaveAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DeleteAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "ApplicationModel_Appointments")]
pub fn FindAppointmentCalendarsAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::Appointments::AppointmentCalendar>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAppointmentCalendarsAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "ApplicationModel_Email")]
pub fn FindEmailMailboxesAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::Email::EmailMailbox>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindEmailMailboxesAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "ApplicationModel_Contacts")]
pub fn FindContactListsAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::Contacts::ContactList>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindContactListsAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "ApplicationModel_Contacts")]
pub fn FindContactAnnotationListsAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::Contacts::ContactAnnotationList>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindContactAnnotationListsAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn EnterpriseId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IUserDataAccount2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EnterpriseId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn IsProtectedUnderLock(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUserDataAccount2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsProtectedUnderLock)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ExplictReadAccessPackageFamilyNames(&self) -> windows_core::Result<windows_collections::IVector<windows_core::HSTRING>> {
let this = &windows_core::Interface::cast::<IUserDataAccount3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ExplictReadAccessPackageFamilyNames)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IUserDataAccount3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDisplayName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUserDataAccount3>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetDisplayName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn CanShowCreateContactGroup(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CanShowCreateContactGroup)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetCanShowCreateContactGroup(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetCanShowCreateContactGroup)(windows_core::Interface::as_raw(this), value).ok() }
}
#[cfg(feature = "Foundation_Collections")]
pub fn ProviderProperties(&self) -> windows_core::Result<super::super::Foundation::Collections::IPropertySet> {
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ProviderProperties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "ApplicationModel_UserDataTasks")]
pub fn FindUserDataTaskListsAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::UserDataTasks::UserDataTaskList>>> {
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindUserDataTaskListsAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "ApplicationModel_Contacts")]
pub fn FindContactGroupsAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::Contacts::ContactGroup>>> {
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindContactGroupsAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn TryShowCreateContactGroupAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_core::HSTRING>> {
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryShowCreateContactGroupAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetIsProtectedUnderLock(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIsProtectedUnderLock)(windows_core::Interface::as_raw(this), value).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn SetIcon<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Storage::Streams::IRandomAccessStreamReference>,
{
let this = &windows_core::Interface::cast::<IUserDataAccount4>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetIcon)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
}
impl windows_core::RuntimeType for UserDataAccount {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccount>();
}
unsafe impl windows_core::Interface for UserDataAccount {
type Vtable = <IUserDataAccount as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccount as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccount {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.UserDataAccount";
}
unsafe impl Send for UserDataAccount {}
unsafe impl Sync for UserDataAccount {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct UserDataAccountContentKinds(pub u32);
impl UserDataAccountContentKinds {
pub const Email: Self = Self(1u32);
pub const Contact: Self = Self(2u32);
pub const Appointment: Self = Self(4u32);
}
impl windows_core::TypeKind for UserDataAccountContentKinds {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for UserDataAccountContentKinds {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.UserDataAccountContentKinds;u4)");
}
impl UserDataAccountContentKinds {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for UserDataAccountContentKinds {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for UserDataAccountContentKinds {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for UserDataAccountContentKinds {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for UserDataAccountContentKinds {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for UserDataAccountContentKinds {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub struct UserDataAccountManager;
impl UserDataAccountManager {
pub fn RequestStoreAsync(storeaccesstype: UserDataAccountStoreAccessType) -> windows_core::Result<windows_future::IAsyncOperation<UserDataAccountStore>> {
Self::IUserDataAccountManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestStoreAsync)(windows_core::Interface::as_raw(this), storeaccesstype, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ShowAddAccountAsync(contentkinds: UserDataAccountContentKinds) -> windows_core::Result<windows_future::IAsyncOperation<windows_core::HSTRING>> {
Self::IUserDataAccountManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowAddAccountAsync)(windows_core::Interface::as_raw(this), contentkinds, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ShowAccountSettingsAsync(id: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncAction> {
Self::IUserDataAccountManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowAccountSettingsAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ShowAccountErrorResolverAsync(id: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncAction> {
Self::IUserDataAccountManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ShowAccountErrorResolverAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
#[cfg(feature = "System")]
pub fn GetForUser<P0>(user: P0) -> windows_core::Result<UserDataAccountManagerForUser>
where
P0: windows_core::Param<super::super::System::User>,
{
Self::IUserDataAccountManagerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForUser)(windows_core::Interface::as_raw(this), user.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IUserDataAccountManagerStatics<R, F: FnOnce(&IUserDataAccountManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserDataAccountManager, IUserDataAccountManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IUserDataAccountManagerStatics2<R, F: FnOnce(&IUserDataAccountManagerStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UserDataAccountManager, IUserDataAccountManagerStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for UserDataAccountManager {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.UserDataAccountManager";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccountManagerForUser(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccountManagerForUser, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataAccountManagerForUser {
pub fn RequestStoreAsync(&self, storeaccesstype: UserDataAccountStoreAccessType) -> windows_core::Result<windows_future::IAsyncOperation<UserDataAccountStore>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestStoreAsync)(windows_core::Interface::as_raw(this), storeaccesstype, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "System")]
pub fn User(&self) -> windows_core::Result<super::super::System::User> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).User)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataAccountManagerForUser {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccountManagerForUser>();
}
unsafe impl windows_core::Interface for UserDataAccountManagerForUser {
type Vtable = <IUserDataAccountManagerForUser as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccountManagerForUser as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccountManagerForUser {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.UserDataAccountManagerForUser";
}
unsafe impl Send for UserDataAccountManagerForUser {}
unsafe impl Sync for UserDataAccountManagerForUser {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct UserDataAccountOtherAppReadAccess(pub i32);
impl UserDataAccountOtherAppReadAccess {
pub const SystemOnly: Self = Self(0i32);
pub const Full: Self = Self(1i32);
pub const None: Self = Self(2i32);
}
impl windows_core::TypeKind for UserDataAccountOtherAppReadAccess {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for UserDataAccountOtherAppReadAccess {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.UserDataAccountOtherAppReadAccess;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccountStore(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccountStore, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataAccountStore {
pub fn FindAccountsAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<UserDataAccount>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAccountsAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetAccountAsync(&self, id: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<UserDataAccount>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetAccountAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn CreateAccountAsync(&self, userdisplayname: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<UserDataAccount>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateAccountAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(userdisplayname), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn CreateAccountWithPackageRelativeAppIdAsync(&self, userdisplayname: &windows_core::HSTRING, packagerelativeappid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<UserDataAccount>> {
let this = &windows_core::Interface::cast::<IUserDataAccountStore2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateAccountWithPackageRelativeAppIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(userdisplayname), core::mem::transmute_copy(packagerelativeappid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StoreChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<UserDataAccountStore, UserDataAccountStoreChangedEventArgs>>,
{
let this = &windows_core::Interface::cast::<IUserDataAccountStore2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StoreChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveStoreChanged(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUserDataAccountStore2>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemoveStoreChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn CreateAccountWithPackageRelativeAppIdAndEnterpriseIdAsync(&self, userdisplayname: &windows_core::HSTRING, packagerelativeappid: &windows_core::HSTRING, enterpriseid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<UserDataAccount>> {
let this = &windows_core::Interface::cast::<IUserDataAccountStore3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateAccountWithPackageRelativeAppIdAndEnterpriseIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(userdisplayname), core::mem::transmute_copy(packagerelativeappid), core::mem::transmute_copy(enterpriseid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataAccountStore {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccountStore>();
}
unsafe impl windows_core::Interface for UserDataAccountStore {
type Vtable = <IUserDataAccountStore as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccountStore as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccountStore {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.UserDataAccountStore";
}
unsafe impl Send for UserDataAccountStore {}
unsafe impl Sync for UserDataAccountStore {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct UserDataAccountStoreAccessType(pub i32);
impl UserDataAccountStoreAccessType {
pub const AllAccountsReadOnly: Self = Self(0i32);
pub const AppAccountsReadWrite: Self = Self(1i32);
}
impl windows_core::TypeKind for UserDataAccountStoreAccessType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for UserDataAccountStoreAccessType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.UserDataAccounts.UserDataAccountStoreAccessType;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataAccountStoreChangedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataAccountStoreChangedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataAccountStoreChangedEventArgs {
pub fn GetDeferral(&self) -> windows_core::Result<super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataAccountStoreChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataAccountStoreChangedEventArgs>();
}
unsafe impl windows_core::Interface for UserDataAccountStoreChangedEventArgs {
type Vtable = <IUserDataAccountStoreChangedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataAccountStoreChangedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataAccountStoreChangedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.UserDataAccounts.UserDataAccountStoreChangedEventArgs";
}
unsafe impl Send for UserDataAccountStoreChangedEventArgs {}
unsafe impl Sync for UserDataAccountStoreChangedEventArgs {}
@@ -0,0 +1,652 @@
windows_core::imp::define_interface!(IUserDataTaskDataProviderConnection, IUserDataTaskDataProviderConnection_Vtbl, 0x9ff39d1d_a447_428b_afe9_e5402bdeb041);
impl windows_core::RuntimeType for IUserDataTaskDataProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskDataProviderConnection_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateOrUpdateTaskRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveCreateOrUpdateTaskRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub SyncRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveSyncRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub SkipOccurrenceRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveSkipOccurrenceRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub CompleteTaskRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveCompleteTaskRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub DeleteTaskRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveDeleteTaskRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskDataProviderTriggerDetails, IUserDataTaskDataProviderTriggerDetails_Vtbl, 0xae273202_b1c9_453e_afc5_b30af3bd217d);
impl windows_core::RuntimeType for IUserDataTaskDataProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskDataProviderTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Connection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListCompleteTaskRequest, IUserDataTaskListCompleteTaskRequest_Vtbl, 0xf65e14a3_1a42_49da_8552_2873e52c55eb);
impl windows_core::RuntimeType for IUserDataTaskListCompleteTaskRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListCompleteTaskRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TaskListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TaskId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListCompleteTaskRequestEventArgs, IUserDataTaskListCompleteTaskRequestEventArgs_Vtbl, 0xd77c393d_4cf2_48ad_87fd_963f0eaa7a95);
impl windows_core::RuntimeType for IUserDataTaskListCompleteTaskRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListCompleteTaskRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListCreateOrUpdateTaskRequest, IUserDataTaskListCreateOrUpdateTaskRequest_Vtbl, 0x2133772c_55c2_4300_8279_04326e07cce4);
impl windows_core::RuntimeType for IUserDataTaskListCreateOrUpdateTaskRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListCreateOrUpdateTaskRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TaskListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Task: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListCreateOrUpdateTaskRequestEventArgs, IUserDataTaskListCreateOrUpdateTaskRequestEventArgs_Vtbl, 0x12c55a52_e378_419b_ae38_a5e9e604476e);
impl windows_core::RuntimeType for IUserDataTaskListCreateOrUpdateTaskRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListCreateOrUpdateTaskRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListDeleteTaskRequest, IUserDataTaskListDeleteTaskRequest_Vtbl, 0x4b863c68_7657_4f3d_b074_d47ec8df07e7);
impl windows_core::RuntimeType for IUserDataTaskListDeleteTaskRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListDeleteTaskRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TaskListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TaskId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListDeleteTaskRequestEventArgs, IUserDataTaskListDeleteTaskRequestEventArgs_Vtbl, 0x6063dad9_f562_4145_8efe_d50078c92b7f);
impl windows_core::RuntimeType for IUserDataTaskListDeleteTaskRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListDeleteTaskRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListSkipOccurrenceRequest, IUserDataTaskListSkipOccurrenceRequest_Vtbl, 0xab87e34d_1cd3_431c_9f58_089aa4338d85);
impl windows_core::RuntimeType for IUserDataTaskListSkipOccurrenceRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListSkipOccurrenceRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TaskListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TaskId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListSkipOccurrenceRequestEventArgs, IUserDataTaskListSkipOccurrenceRequestEventArgs_Vtbl, 0x7a3b924a_cc2f_4e7b_aacd_a5b9d29cfa4e);
impl windows_core::RuntimeType for IUserDataTaskListSkipOccurrenceRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListSkipOccurrenceRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListSyncManagerSyncRequest, IUserDataTaskListSyncManagerSyncRequest_Vtbl, 0x40a73807_7590_4149_ae19_b211431a9f48);
impl windows_core::RuntimeType for IUserDataTaskListSyncManagerSyncRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListSyncManagerSyncRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TaskListId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportCompletedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailedAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IUserDataTaskListSyncManagerSyncRequestEventArgs, IUserDataTaskListSyncManagerSyncRequestEventArgs_Vtbl, 0x8ead1c12_768e_43bd_8385_5cdc351ffdea);
impl windows_core::RuntimeType for IUserDataTaskListSyncManagerSyncRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IUserDataTaskListSyncManagerSyncRequestEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskDataProviderConnection(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskDataProviderConnection, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskDataProviderConnection {
pub fn CreateOrUpdateTaskRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<UserDataTaskDataProviderConnection, UserDataTaskListCreateOrUpdateTaskRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateOrUpdateTaskRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveCreateOrUpdateTaskRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveCreateOrUpdateTaskRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn SyncRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<UserDataTaskDataProviderConnection, UserDataTaskListSyncManagerSyncRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SyncRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveSyncRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveSyncRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn SkipOccurrenceRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<UserDataTaskDataProviderConnection, UserDataTaskListSkipOccurrenceRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SkipOccurrenceRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveSkipOccurrenceRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveSkipOccurrenceRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn CompleteTaskRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<UserDataTaskDataProviderConnection, UserDataTaskListCompleteTaskRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CompleteTaskRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveCompleteTaskRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveCompleteTaskRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn DeleteTaskRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<UserDataTaskDataProviderConnection, UserDataTaskListDeleteTaskRequestEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteTaskRequested)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveDeleteTaskRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveDeleteTaskRequested)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for UserDataTaskDataProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskDataProviderConnection>();
}
unsafe impl windows_core::Interface for UserDataTaskDataProviderConnection {
type Vtable = <IUserDataTaskDataProviderConnection as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskDataProviderConnection as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskDataProviderConnection {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskDataProviderConnection";
}
unsafe impl Send for UserDataTaskDataProviderConnection {}
unsafe impl Sync for UserDataTaskDataProviderConnection {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskDataProviderTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskDataProviderTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskDataProviderTriggerDetails {
pub fn Connection(&self) -> windows_core::Result<UserDataTaskDataProviderConnection> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Connection)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskDataProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskDataProviderTriggerDetails>();
}
unsafe impl windows_core::Interface for UserDataTaskDataProviderTriggerDetails {
type Vtable = <IUserDataTaskDataProviderTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskDataProviderTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskDataProviderTriggerDetails {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskDataProviderTriggerDetails";
}
unsafe impl Send for UserDataTaskDataProviderTriggerDetails {}
unsafe impl Sync for UserDataTaskDataProviderTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListCompleteTaskRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListCompleteTaskRequest, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListCompleteTaskRequest {
pub fn TaskListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn TaskId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self, completedtaskid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(completedtaskid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListCompleteTaskRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListCompleteTaskRequest>();
}
unsafe impl windows_core::Interface for UserDataTaskListCompleteTaskRequest {
type Vtable = <IUserDataTaskListCompleteTaskRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListCompleteTaskRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListCompleteTaskRequest {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListCompleteTaskRequest";
}
unsafe impl Send for UserDataTaskListCompleteTaskRequest {}
unsafe impl Sync for UserDataTaskListCompleteTaskRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListCompleteTaskRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListCompleteTaskRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListCompleteTaskRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<UserDataTaskListCompleteTaskRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListCompleteTaskRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListCompleteTaskRequestEventArgs>();
}
unsafe impl windows_core::Interface for UserDataTaskListCompleteTaskRequestEventArgs {
type Vtable = <IUserDataTaskListCompleteTaskRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListCompleteTaskRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListCompleteTaskRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListCompleteTaskRequestEventArgs";
}
unsafe impl Send for UserDataTaskListCompleteTaskRequestEventArgs {}
unsafe impl Sync for UserDataTaskListCompleteTaskRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListCreateOrUpdateTaskRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListCreateOrUpdateTaskRequest, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListCreateOrUpdateTaskRequest {
pub fn TaskListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Task(&self) -> windows_core::Result<super::UserDataTask> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Task)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportCompletedAsync<P0>(&self, createdorupdateduserdatatask: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::UserDataTask>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), createdorupdateduserdatatask.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListCreateOrUpdateTaskRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListCreateOrUpdateTaskRequest>();
}
unsafe impl windows_core::Interface for UserDataTaskListCreateOrUpdateTaskRequest {
type Vtable = <IUserDataTaskListCreateOrUpdateTaskRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListCreateOrUpdateTaskRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListCreateOrUpdateTaskRequest {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListCreateOrUpdateTaskRequest";
}
unsafe impl Send for UserDataTaskListCreateOrUpdateTaskRequest {}
unsafe impl Sync for UserDataTaskListCreateOrUpdateTaskRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListCreateOrUpdateTaskRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListCreateOrUpdateTaskRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListCreateOrUpdateTaskRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<UserDataTaskListCreateOrUpdateTaskRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListCreateOrUpdateTaskRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListCreateOrUpdateTaskRequestEventArgs>();
}
unsafe impl windows_core::Interface for UserDataTaskListCreateOrUpdateTaskRequestEventArgs {
type Vtable = <IUserDataTaskListCreateOrUpdateTaskRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListCreateOrUpdateTaskRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListCreateOrUpdateTaskRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListCreateOrUpdateTaskRequestEventArgs";
}
unsafe impl Send for UserDataTaskListCreateOrUpdateTaskRequestEventArgs {}
unsafe impl Sync for UserDataTaskListCreateOrUpdateTaskRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListDeleteTaskRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListDeleteTaskRequest, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListDeleteTaskRequest {
pub fn TaskListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn TaskId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListDeleteTaskRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListDeleteTaskRequest>();
}
unsafe impl windows_core::Interface for UserDataTaskListDeleteTaskRequest {
type Vtable = <IUserDataTaskListDeleteTaskRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListDeleteTaskRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListDeleteTaskRequest {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListDeleteTaskRequest";
}
unsafe impl Send for UserDataTaskListDeleteTaskRequest {}
unsafe impl Sync for UserDataTaskListDeleteTaskRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListDeleteTaskRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListDeleteTaskRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListDeleteTaskRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<UserDataTaskListDeleteTaskRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListDeleteTaskRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListDeleteTaskRequestEventArgs>();
}
unsafe impl windows_core::Interface for UserDataTaskListDeleteTaskRequestEventArgs {
type Vtable = <IUserDataTaskListDeleteTaskRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListDeleteTaskRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListDeleteTaskRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListDeleteTaskRequestEventArgs";
}
unsafe impl Send for UserDataTaskListDeleteTaskRequestEventArgs {}
unsafe impl Sync for UserDataTaskListDeleteTaskRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListSkipOccurrenceRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListSkipOccurrenceRequest, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListSkipOccurrenceRequest {
pub fn TaskListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn TaskId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListSkipOccurrenceRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListSkipOccurrenceRequest>();
}
unsafe impl windows_core::Interface for UserDataTaskListSkipOccurrenceRequest {
type Vtable = <IUserDataTaskListSkipOccurrenceRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListSkipOccurrenceRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListSkipOccurrenceRequest {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListSkipOccurrenceRequest";
}
unsafe impl Send for UserDataTaskListSkipOccurrenceRequest {}
unsafe impl Sync for UserDataTaskListSkipOccurrenceRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListSkipOccurrenceRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListSkipOccurrenceRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListSkipOccurrenceRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<UserDataTaskListSkipOccurrenceRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListSkipOccurrenceRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListSkipOccurrenceRequestEventArgs>();
}
unsafe impl windows_core::Interface for UserDataTaskListSkipOccurrenceRequestEventArgs {
type Vtable = <IUserDataTaskListSkipOccurrenceRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListSkipOccurrenceRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListSkipOccurrenceRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListSkipOccurrenceRequestEventArgs";
}
unsafe impl Send for UserDataTaskListSkipOccurrenceRequestEventArgs {}
unsafe impl Sync for UserDataTaskListSkipOccurrenceRequestEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListSyncManagerSyncRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListSyncManagerSyncRequest, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListSyncManagerSyncRequest {
pub fn TaskListId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TaskListId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ReportCompletedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportCompletedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailedAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailedAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListSyncManagerSyncRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListSyncManagerSyncRequest>();
}
unsafe impl windows_core::Interface for UserDataTaskListSyncManagerSyncRequest {
type Vtable = <IUserDataTaskListSyncManagerSyncRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListSyncManagerSyncRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListSyncManagerSyncRequest {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListSyncManagerSyncRequest";
}
unsafe impl Send for UserDataTaskListSyncManagerSyncRequest {}
unsafe impl Sync for UserDataTaskListSyncManagerSyncRequest {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserDataTaskListSyncManagerSyncRequestEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(UserDataTaskListSyncManagerSyncRequestEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl UserDataTaskListSyncManagerSyncRequestEventArgs {
pub fn Request(&self) -> windows_core::Result<UserDataTaskListSyncManagerSyncRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeferral(&self) -> windows_core::Result<super::super::super::Foundation::Deferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for UserDataTaskListSyncManagerSyncRequestEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IUserDataTaskListSyncManagerSyncRequestEventArgs>();
}
unsafe impl windows_core::Interface for UserDataTaskListSyncManagerSyncRequestEventArgs {
type Vtable = <IUserDataTaskListSyncManagerSyncRequestEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUserDataTaskListSyncManagerSyncRequestEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UserDataTaskListSyncManagerSyncRequestEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.UserDataTasks.DataProvider.UserDataTaskListSyncManagerSyncRequestEventArgs";
}
unsafe impl Send for UserDataTaskListSyncManagerSyncRequestEventArgs {}
unsafe impl Sync for UserDataTaskListSyncManagerSyncRequestEventArgs {}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,803 @@
windows_core::imp::define_interface!(IVoiceCommand, IVoiceCommand_Vtbl, 0x936f5273_ec82_42a6_a55c_d2d79ec6f920);
impl windows_core::RuntimeType for IVoiceCommand {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommand_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CommandName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Properties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Media_SpeechRecognition")]
pub SpeechRecognitionResult: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Media_SpeechRecognition"))]
SpeechRecognitionResult: usize,
}
windows_core::imp::define_interface!(IVoiceCommandCompletedEventArgs, IVoiceCommandCompletedEventArgs_Vtbl, 0xc85e675d_fe42_432c_9907_09df9fcf64e8);
impl windows_core::RuntimeType for IVoiceCommandCompletedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandCompletedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Reason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut VoiceCommandCompletionReason) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandConfirmationResult, IVoiceCommandConfirmationResult_Vtbl, 0xa022593e_8221_4526_b083_840972262247);
impl windows_core::RuntimeType for IVoiceCommandConfirmationResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandConfirmationResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Confirmed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandContentTile, IVoiceCommandContentTile_Vtbl, 0x3eefe9f0_b8c7_4c76_a0de_1607895ee327);
impl windows_core::RuntimeType for IVoiceCommandContentTile {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandContentTile_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Title: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetTitle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TextLine1: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetTextLine1: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TextLine2: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetTextLine2: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TextLine3: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetTextLine3: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub Image: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
Image: usize,
#[cfg(feature = "Storage_Streams")]
pub SetImage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SetImage: usize,
pub AppContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAppContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppLaunchArgument: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAppLaunchArgument: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ContentTileType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut VoiceCommandContentTileType) -> windows_core::HRESULT,
pub SetContentTileType: unsafe extern "system" fn(*mut core::ffi::c_void, VoiceCommandContentTileType) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandDefinition, IVoiceCommandDefinition_Vtbl, 0x7972aad0_0974_4979_984b_cb8959cd61ae);
impl windows_core::RuntimeType for IVoiceCommandDefinition {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandDefinition_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Language: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Name: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPhraseListAsync: 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,
}
windows_core::imp::define_interface!(IVoiceCommandDefinitionManagerStatics, IVoiceCommandDefinitionManagerStatics_Vtbl, 0x8fe7a69e_067e_4f16_a18c_5b17e9499940);
impl windows_core::RuntimeType for IVoiceCommandDefinitionManagerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandDefinitionManagerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Streams")]
pub InstallCommandDefinitionsFromStorageFileAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
InstallCommandDefinitionsFromStorageFileAsync: usize,
pub InstalledCommandDefinitions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandDisambiguationResult, IVoiceCommandDisambiguationResult_Vtbl, 0xecc68cfe_c9ac_45df_a8ea_feea08ef9c5e);
impl windows_core::RuntimeType for IVoiceCommandDisambiguationResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandDisambiguationResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SelectedItem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandResponse, IVoiceCommandResponse_Vtbl, 0x0284b30e_8a3b_4cc4_a6a1_cad5be2716b5);
impl windows_core::RuntimeType for IVoiceCommandResponse {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandResponse_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Message: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RepeatMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetRepeatMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AppLaunchArgument: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetAppLaunchArgument: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub VoiceCommandContentTiles: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandResponseStatics, IVoiceCommandResponseStatics_Vtbl, 0x2932f813_0d3b_49f2_96dd_625019bd3b5d);
impl windows_core::RuntimeType for IVoiceCommandResponseStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandResponseStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub MaxSupportedVoiceCommandContentTiles: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub CreateResponse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateResponseWithTiles: 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,
pub CreateResponseForPrompt: 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,
pub CreateResponseForPromptWithTiles: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandServiceConnection, IVoiceCommandServiceConnection_Vtbl, 0xd894bb9f_21da_44a4_98a2_fb131920a9cc);
impl windows_core::RuntimeType for IVoiceCommandServiceConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandServiceConnection_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetVoiceCommandAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestConfirmationAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestDisambiguationAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportProgressAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportSuccessAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportFailureAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestAppLaunchAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Globalization")]
pub Language: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Globalization"))]
Language: usize,
pub VoiceCommandCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveVoiceCommandCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVoiceCommandServiceConnectionStatics, IVoiceCommandServiceConnectionStatics_Vtbl, 0x370ebffb_2d34_42df_8770_074d0f334697);
impl windows_core::RuntimeType for IVoiceCommandServiceConnectionStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandServiceConnectionStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "ApplicationModel_AppService")]
pub FromAppServiceTriggerDetails: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "ApplicationModel_AppService"))]
FromAppServiceTriggerDetails: usize,
}
windows_core::imp::define_interface!(IVoiceCommandUserMessage, IVoiceCommandUserMessage_Vtbl, 0x674eb3c0_44f6_4f07_b979_4c723fc08597);
impl windows_core::RuntimeType for IVoiceCommandUserMessage {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVoiceCommandUserMessage_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DisplayMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDisplayMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SpokenMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetSpokenMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommand(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommand, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommand {
pub fn CommandName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CommandName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Properties(&self) -> windows_core::Result<windows_collections::IMapView<windows_core::HSTRING, windows_collections::IVectorView<windows_core::HSTRING>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Properties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Media_SpeechRecognition")]
pub fn SpeechRecognitionResult(&self) -> windows_core::Result<super::super::Media::SpeechRecognition::SpeechRecognitionResult> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SpeechRecognitionResult)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for VoiceCommand {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommand>();
}
unsafe impl windows_core::Interface for VoiceCommand {
type Vtable = <IVoiceCommand as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommand as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommand {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommand";
}
unsafe impl Send for VoiceCommand {}
unsafe impl Sync for VoiceCommand {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandCompletedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandCompletedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandCompletedEventArgs {
pub fn Reason(&self) -> windows_core::Result<VoiceCommandCompletionReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Reason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for VoiceCommandCompletedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandCompletedEventArgs>();
}
unsafe impl windows_core::Interface for VoiceCommandCompletedEventArgs {
type Vtable = <IVoiceCommandCompletedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandCompletedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandCompletedEventArgs {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandCompletedEventArgs";
}
unsafe impl Send for VoiceCommandCompletedEventArgs {}
unsafe impl Sync for VoiceCommandCompletedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct VoiceCommandCompletionReason(pub i32);
impl VoiceCommandCompletionReason {
pub const Unknown: Self = Self(0i32);
pub const CommunicationFailed: Self = Self(1i32);
pub const ResourceLimitsExceeded: Self = Self(2i32);
pub const Canceled: Self = Self(3i32);
pub const TimeoutExceeded: Self = Self(4i32);
pub const AppLaunched: Self = Self(5i32);
pub const Completed: Self = Self(6i32);
}
impl windows_core::TypeKind for VoiceCommandCompletionReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for VoiceCommandCompletionReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.VoiceCommands.VoiceCommandCompletionReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandConfirmationResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandConfirmationResult, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandConfirmationResult {
pub fn Confirmed(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Confirmed)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for VoiceCommandConfirmationResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandConfirmationResult>();
}
unsafe impl windows_core::Interface for VoiceCommandConfirmationResult {
type Vtable = <IVoiceCommandConfirmationResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandConfirmationResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandConfirmationResult {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandConfirmationResult";
}
unsafe impl Send for VoiceCommandConfirmationResult {}
unsafe impl Sync for VoiceCommandConfirmationResult {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandContentTile(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandContentTile, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandContentTile {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<VoiceCommandContentTile, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Title(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Title)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetTitle(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetTitle)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn TextLine1(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TextLine1)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetTextLine1(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetTextLine1)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn TextLine2(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TextLine2)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetTextLine2(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetTextLine2)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn TextLine3(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TextLine3)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetTextLine3(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetTextLine3)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn Image(&self) -> windows_core::Result<super::super::Storage::IStorageFile> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Image)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn SetImage<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Storage::IStorageFile>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetImage)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn AppContext(&self) -> windows_core::Result<windows_core::IInspectable> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppContext)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetAppContext<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAppContext)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn AppLaunchArgument(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppLaunchArgument)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetAppLaunchArgument(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAppLaunchArgument)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn ContentTileType(&self) -> windows_core::Result<VoiceCommandContentTileType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContentTileType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetContentTileType(&self, value: VoiceCommandContentTileType) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetContentTileType)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for VoiceCommandContentTile {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandContentTile>();
}
unsafe impl windows_core::Interface for VoiceCommandContentTile {
type Vtable = <IVoiceCommandContentTile as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandContentTile as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandContentTile {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandContentTile";
}
unsafe impl Send for VoiceCommandContentTile {}
unsafe impl Sync for VoiceCommandContentTile {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct VoiceCommandContentTileType(pub i32);
impl VoiceCommandContentTileType {
pub const TitleOnly: Self = Self(0i32);
pub const TitleWithText: Self = Self(1i32);
pub const TitleWith68x68Icon: Self = Self(2i32);
pub const TitleWith68x68IconAndText: Self = Self(3i32);
pub const TitleWith68x92Icon: Self = Self(4i32);
pub const TitleWith68x92IconAndText: Self = Self(5i32);
pub const TitleWith280x140Icon: Self = Self(6i32);
pub const TitleWith280x140IconAndText: Self = Self(7i32);
}
impl windows_core::TypeKind for VoiceCommandContentTileType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for VoiceCommandContentTileType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.VoiceCommands.VoiceCommandContentTileType;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandDefinition(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandDefinition, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandDefinition {
pub fn Language(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Language)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Name(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Name)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetPhraseListAsync<P1>(&self, phraselistname: &windows_core::HSTRING, phraselist: P1) -> windows_core::Result<windows_future::IAsyncAction>
where
P1: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SetPhraseListAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(phraselistname), phraselist.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for VoiceCommandDefinition {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandDefinition>();
}
unsafe impl windows_core::Interface for VoiceCommandDefinition {
type Vtable = <IVoiceCommandDefinition as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandDefinition as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandDefinition {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinition";
}
unsafe impl Send for VoiceCommandDefinition {}
unsafe impl Sync for VoiceCommandDefinition {}
pub struct VoiceCommandDefinitionManager;
impl VoiceCommandDefinitionManager {
#[cfg(feature = "Storage_Streams")]
pub fn InstallCommandDefinitionsFromStorageFileAsync<P0>(file: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::super::Storage::StorageFile>,
{
Self::IVoiceCommandDefinitionManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InstallCommandDefinitionsFromStorageFileAsync)(windows_core::Interface::as_raw(this), file.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn InstalledCommandDefinitions() -> windows_core::Result<windows_collections::IMapView<windows_core::HSTRING, VoiceCommandDefinition>> {
Self::IVoiceCommandDefinitionManagerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InstalledCommandDefinitions)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IVoiceCommandDefinitionManagerStatics<R, F: FnOnce(&IVoiceCommandDefinitionManagerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<VoiceCommandDefinitionManager, IVoiceCommandDefinitionManagerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for VoiceCommandDefinitionManager {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandDisambiguationResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandDisambiguationResult, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandDisambiguationResult {
pub fn SelectedItem(&self) -> windows_core::Result<VoiceCommandContentTile> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SelectedItem)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for VoiceCommandDisambiguationResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandDisambiguationResult>();
}
unsafe impl windows_core::Interface for VoiceCommandDisambiguationResult {
type Vtable = <IVoiceCommandDisambiguationResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandDisambiguationResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandDisambiguationResult {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandDisambiguationResult";
}
unsafe impl Send for VoiceCommandDisambiguationResult {}
unsafe impl Sync for VoiceCommandDisambiguationResult {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandResponse(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandResponse, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandResponse {
pub fn Message(&self) -> windows_core::Result<VoiceCommandUserMessage> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Message)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetMessage<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<VoiceCommandUserMessage>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetMessage)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn RepeatMessage(&self) -> windows_core::Result<VoiceCommandUserMessage> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RepeatMessage)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetRepeatMessage<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<VoiceCommandUserMessage>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetRepeatMessage)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn AppLaunchArgument(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppLaunchArgument)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetAppLaunchArgument(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetAppLaunchArgument)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn VoiceCommandContentTiles(&self) -> windows_core::Result<windows_collections::IVector<VoiceCommandContentTile>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).VoiceCommandContentTiles)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn MaxSupportedVoiceCommandContentTiles() -> windows_core::Result<u32> {
Self::IVoiceCommandResponseStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxSupportedVoiceCommandContentTiles)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn CreateResponse<P0>(usermessage: P0) -> windows_core::Result<VoiceCommandResponse>
where
P0: windows_core::Param<VoiceCommandUserMessage>,
{
Self::IVoiceCommandResponseStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateResponse)(windows_core::Interface::as_raw(this), usermessage.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateResponseWithTiles<P0, P1>(message: P0, contenttiles: P1) -> windows_core::Result<VoiceCommandResponse>
where
P0: windows_core::Param<VoiceCommandUserMessage>,
P1: windows_core::Param<windows_collections::IIterable<VoiceCommandContentTile>>,
{
Self::IVoiceCommandResponseStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateResponseWithTiles)(windows_core::Interface::as_raw(this), message.param().abi(), contenttiles.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateResponseForPrompt<P0, P1>(message: P0, repeatmessage: P1) -> windows_core::Result<VoiceCommandResponse>
where
P0: windows_core::Param<VoiceCommandUserMessage>,
P1: windows_core::Param<VoiceCommandUserMessage>,
{
Self::IVoiceCommandResponseStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateResponseForPrompt)(windows_core::Interface::as_raw(this), message.param().abi(), repeatmessage.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateResponseForPromptWithTiles<P0, P1, P2>(message: P0, repeatmessage: P1, contenttiles: P2) -> windows_core::Result<VoiceCommandResponse>
where
P0: windows_core::Param<VoiceCommandUserMessage>,
P1: windows_core::Param<VoiceCommandUserMessage>,
P2: windows_core::Param<windows_collections::IIterable<VoiceCommandContentTile>>,
{
Self::IVoiceCommandResponseStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateResponseForPromptWithTiles)(windows_core::Interface::as_raw(this), message.param().abi(), repeatmessage.param().abi(), contenttiles.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IVoiceCommandResponseStatics<R, F: FnOnce(&IVoiceCommandResponseStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<VoiceCommandResponse, IVoiceCommandResponseStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for VoiceCommandResponse {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandResponse>();
}
unsafe impl windows_core::Interface for VoiceCommandResponse {
type Vtable = <IVoiceCommandResponse as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandResponse as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandResponse {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandResponse";
}
unsafe impl Send for VoiceCommandResponse {}
unsafe impl Sync for VoiceCommandResponse {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandServiceConnection(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandServiceConnection, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandServiceConnection {
pub fn GetVoiceCommandAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<VoiceCommand>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetVoiceCommandAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestConfirmationAsync<P0>(&self, response: P0) -> windows_core::Result<windows_future::IAsyncOperation<VoiceCommandConfirmationResult>>
where
P0: windows_core::Param<VoiceCommandResponse>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestConfirmationAsync)(windows_core::Interface::as_raw(this), response.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestDisambiguationAsync<P0>(&self, response: P0) -> windows_core::Result<windows_future::IAsyncOperation<VoiceCommandDisambiguationResult>>
where
P0: windows_core::Param<VoiceCommandResponse>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestDisambiguationAsync)(windows_core::Interface::as_raw(this), response.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportProgressAsync<P0>(&self, response: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<VoiceCommandResponse>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportProgressAsync)(windows_core::Interface::as_raw(this), response.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportSuccessAsync<P0>(&self, response: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<VoiceCommandResponse>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportSuccessAsync)(windows_core::Interface::as_raw(this), response.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportFailureAsync<P0>(&self, response: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<VoiceCommandResponse>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportFailureAsync)(windows_core::Interface::as_raw(this), response.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestAppLaunchAsync<P0>(&self, response: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<VoiceCommandResponse>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestAppLaunchAsync)(windows_core::Interface::as_raw(this), response.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Globalization")]
pub fn Language(&self) -> windows_core::Result<super::super::Globalization::Language> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Language)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn VoiceCommandCompleted<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<VoiceCommandServiceConnection, VoiceCommandCompletedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).VoiceCommandCompleted)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveVoiceCommandCompleted(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveVoiceCommandCompleted)(windows_core::Interface::as_raw(this), token).ok() }
}
#[cfg(feature = "ApplicationModel_AppService")]
pub fn FromAppServiceTriggerDetails<P0>(triggerdetails: P0) -> windows_core::Result<VoiceCommandServiceConnection>
where
P0: windows_core::Param<super::AppService::AppServiceTriggerDetails>,
{
Self::IVoiceCommandServiceConnectionStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromAppServiceTriggerDetails)(windows_core::Interface::as_raw(this), triggerdetails.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IVoiceCommandServiceConnectionStatics<R, F: FnOnce(&IVoiceCommandServiceConnectionStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<VoiceCommandServiceConnection, IVoiceCommandServiceConnectionStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for VoiceCommandServiceConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandServiceConnection>();
}
unsafe impl windows_core::Interface for VoiceCommandServiceConnection {
type Vtable = <IVoiceCommandServiceConnection as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandServiceConnection as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandServiceConnection {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandServiceConnection";
}
unsafe impl Send for VoiceCommandServiceConnection {}
unsafe impl Sync for VoiceCommandServiceConnection {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VoiceCommandUserMessage(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VoiceCommandUserMessage, windows_core::IUnknown, windows_core::IInspectable);
impl VoiceCommandUserMessage {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<VoiceCommandUserMessage, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn DisplayMessage(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayMessage)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetDisplayMessage(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDisplayMessage)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn SpokenMessage(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SpokenMessage)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetSpokenMessage(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSpokenMessage)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
}
impl windows_core::RuntimeType for VoiceCommandUserMessage {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVoiceCommandUserMessage>();
}
unsafe impl windows_core::Interface for VoiceCommandUserMessage {
type Vtable = <IVoiceCommandUserMessage as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVoiceCommandUserMessage as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VoiceCommandUserMessage {
const NAME: &'static str = "Windows.ApplicationModel.VoiceCommands.VoiceCommandUserMessage";
}
unsafe impl Send for VoiceCommandUserMessage {}
unsafe impl Sync for VoiceCommandUserMessage {}
@@ -0,0 +1,148 @@
windows_core::imp::define_interface!(IWalletItemSystemStore, IWalletItemSystemStore_Vtbl, 0x522e2bff_96a2_4a17_8d19_fe1d9f837561);
impl windows_core::RuntimeType for IWalletItemSystemStore {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IWalletItemSystemStore_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetItemsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeleteAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub ImportItemAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
ImportItemAsync: usize,
pub GetAppStatusForItem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut WalletItemAppAssociation) -> windows_core::HRESULT,
pub LaunchAppForItemAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IWalletItemSystemStore2, IWalletItemSystemStore2_Vtbl, 0xf98d3a4e_be00_4fdd_9734_6c113c1ac1cb);
impl windows_core::RuntimeType for IWalletItemSystemStore2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IWalletItemSystemStore2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ItemsChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveItemsChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IWalletManagerSystemStatics, IWalletManagerSystemStatics_Vtbl, 0xbee8eb89_2634_4b9a_8b23_ee8903c91fe0);
impl windows_core::RuntimeType for IWalletManagerSystemStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IWalletManagerSystemStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestStoreAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct WalletItemAppAssociation(pub i32);
impl WalletItemAppAssociation {
pub const None: Self = Self(0i32);
pub const AppInstalled: Self = Self(1i32);
pub const AppNotInstalled: Self = Self(2i32);
}
impl windows_core::TypeKind for WalletItemAppAssociation {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for WalletItemAppAssociation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.Wallet.System.WalletItemAppAssociation;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct WalletItemSystemStore(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(WalletItemSystemStore, windows_core::IUnknown, windows_core::IInspectable);
impl WalletItemSystemStore {
pub fn GetItemsAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::WalletItem>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetItemsAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DeleteAsync<P0>(&self, item: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::WalletItem>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeleteAsync)(windows_core::Interface::as_raw(this), item.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn ImportItemAsync<P0>(&self, stream: P0) -> windows_core::Result<windows_future::IAsyncOperation<super::WalletItem>>
where
P0: windows_core::Param<super::super::super::Storage::Streams::IRandomAccessStreamReference>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ImportItemAsync)(windows_core::Interface::as_raw(this), stream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetAppStatusForItem<P0>(&self, item: P0) -> windows_core::Result<WalletItemAppAssociation>
where
P0: windows_core::Param<super::WalletItem>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetAppStatusForItem)(windows_core::Interface::as_raw(this), item.param().abi(), &mut result__).map(|| result__)
}
}
pub fn LaunchAppForItemAsync<P0>(&self, item: P0) -> windows_core::Result<windows_future::IAsyncOperation<bool>>
where
P0: windows_core::Param<super::WalletItem>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LaunchAppForItemAsync)(windows_core::Interface::as_raw(this), item.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ItemsChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<WalletItemSystemStore, windows_core::IInspectable>>,
{
let this = &windows_core::Interface::cast::<IWalletItemSystemStore2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ItemsChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveItemsChanged(&self, cookie: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IWalletItemSystemStore2>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemoveItemsChanged)(windows_core::Interface::as_raw(this), cookie).ok() }
}
}
impl windows_core::RuntimeType for WalletItemSystemStore {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IWalletItemSystemStore>();
}
unsafe impl windows_core::Interface for WalletItemSystemStore {
type Vtable = <IWalletItemSystemStore as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IWalletItemSystemStore as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for WalletItemSystemStore {
const NAME: &'static str = "Windows.ApplicationModel.Wallet.System.WalletItemSystemStore";
}
unsafe impl Send for WalletItemSystemStore {}
unsafe impl Sync for WalletItemSystemStore {}
pub struct WalletManagerSystem;
impl WalletManagerSystem {
pub fn RequestStoreAsync() -> windows_core::Result<windows_future::IAsyncOperation<WalletItemSystemStore>> {
Self::IWalletManagerSystemStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestStoreAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IWalletManagerSystemStatics<R, F: FnOnce(&IWalletManagerSystemStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<WalletManagerSystem, IWalletManagerSystemStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for WalletManagerSystem {
const NAME: &'static str = "Windows.ApplicationModel.Wallet.System.WalletManagerSystem";
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
pub struct HtmlUtilities;
impl HtmlUtilities {
pub fn ConvertToText(html: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
Self::IHtmlUtilities(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ConvertToText)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(html), &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IHtmlUtilities<R, F: FnOnce(&IHtmlUtilities) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<HtmlUtilities, IHtmlUtilities> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for HtmlUtilities {
const NAME: &'static str = "Windows.Data.Html.HtmlUtilities";
}
windows_core::imp::define_interface!(IHtmlUtilities, IHtmlUtilities_Vtbl, 0xfec00add_2399_4fac_b5a7_05e9acd7181d);
impl windows_core::RuntimeType for IHtmlUtilities {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IHtmlUtilities_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ConvertToText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
+948
View File
@@ -0,0 +1,948 @@
windows_core::imp::define_interface!(IJsonArray, IJsonArray_Vtbl, 0x08c1ddb6_0cbd_4a9a_b5d3_2f852dc37e81);
impl windows_core::RuntimeType for IJsonArray {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonArray_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetObjectAt: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetArrayAt: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStringAt: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNumberAt: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f64) -> windows_core::HRESULT,
pub GetBooleanAt: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonArrayStatics, IJsonArrayStatics_Vtbl, 0xdb1434a9_e164_499f_93e2_8a8f49bb90ba);
impl windows_core::RuntimeType for IJsonArrayStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonArrayStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Parse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TryParse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonErrorStatics2, IJsonErrorStatics2_Vtbl, 0x404030da_87d0_436c_83ab_fc7b12c0cc26);
impl windows_core::RuntimeType for IJsonErrorStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonErrorStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetJsonStatus: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut JsonErrorStatus) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonObject, IJsonObject_Vtbl, 0x064e24dd_29c2_4f83_9ac1_9ee11578beb3);
impl windows_core::RuntimeType for IJsonObject {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonObject_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetNamedValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetNamedValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNamedObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNamedArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNamedString: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNamedNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub GetNamedBoolean: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonObjectStatics, IJsonObjectStatics_Vtbl, 0x2289f159_54de_45d8_abcc_22603fa066a0);
impl windows_core::RuntimeType for IJsonObjectStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonObjectStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Parse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TryParse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonObjectWithDefaultValues, IJsonObjectWithDefaultValues_Vtbl, 0xd960d2a2_b7f0_4f00_8e44_d82cf415ea13);
impl windows_core::RuntimeType for IJsonObjectWithDefaultValues {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonObjectWithDefaultValues_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetNamedValueOrDefault: 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,
pub GetNamedObjectOrDefault: 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,
pub GetNamedStringOrDefault: 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,
pub GetNamedArrayOrDefault: 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,
pub GetNamedNumberOrDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, f64, *mut f64) -> windows_core::HRESULT,
pub GetNamedBooleanOrDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, bool, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonValue, IJsonValue_Vtbl, 0xa3219ecb_f0b3_4dcd_beee_19d48cd3ed1e);
impl windows_core::RuntimeType for IJsonValue {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IJsonValue, windows_core::IUnknown, windows_core::IInspectable);
impl IJsonValue {
pub fn ValueType(&self) -> windows_core::Result<JsonValueType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Stringify(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Stringify)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetNumber(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetBoolean(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetBoolean)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetArray(&self) -> windows_core::Result<JsonArray> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetArray)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetObject(&self) -> windows_core::Result<JsonObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetObject)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IJsonValue {
const NAME: &'static str = "Windows.Data.Json.IJsonValue";
}
pub trait IJsonValue_Impl: windows_core::IUnknownImpl {
fn ValueType(&self) -> windows_core::Result<JsonValueType>;
fn Stringify(&self) -> windows_core::Result<windows_core::HSTRING>;
fn GetString(&self) -> windows_core::Result<windows_core::HSTRING>;
fn GetNumber(&self) -> windows_core::Result<f64>;
fn GetBoolean(&self) -> windows_core::Result<bool>;
fn GetArray(&self) -> windows_core::Result<JsonArray>;
fn GetObject(&self) -> windows_core::Result<JsonObject>;
}
impl IJsonValue_Vtbl {
pub const fn new<Identity: IJsonValue_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ValueType<Identity: IJsonValue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut JsonValueType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IJsonValue_Impl::ValueType(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Stringify<Identity: IJsonValue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IJsonValue_Impl::Stringify(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetString<Identity: IJsonValue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IJsonValue_Impl::GetString(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetNumber<Identity: IJsonValue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IJsonValue_Impl::GetNumber(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBoolean<Identity: IJsonValue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IJsonValue_Impl::GetBoolean(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetArray<Identity: IJsonValue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IJsonValue_Impl::GetArray(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetObject<Identity: IJsonValue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IJsonValue_Impl::GetObject(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IJsonValue, OFFSET>(),
ValueType: ValueType::<Identity, OFFSET>,
Stringify: Stringify::<Identity, OFFSET>,
GetString: GetString::<Identity, OFFSET>,
GetNumber: GetNumber::<Identity, OFFSET>,
GetBoolean: GetBoolean::<Identity, OFFSET>,
GetArray: GetArray::<Identity, OFFSET>,
GetObject: GetObject::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IJsonValue as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonValue_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ValueType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut JsonValueType) -> windows_core::HRESULT,
pub Stringify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetString: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub GetBoolean: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub GetArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonValueStatics, IJsonValueStatics_Vtbl, 0x5f6b544a_2f53_48e1_91a3_f78b50a6345c);
impl windows_core::RuntimeType for IJsonValueStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonValueStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Parse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TryParse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub CreateBooleanValue: unsafe extern "system" fn(*mut core::ffi::c_void, bool, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateNumberValue: unsafe extern "system" fn(*mut core::ffi::c_void, f64, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateStringValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IJsonValueStatics2, IJsonValueStatics2_Vtbl, 0x1d9ecbe4_3fe8_4335_8392_93d8e36865f0);
impl windows_core::RuntimeType for IJsonValueStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IJsonValueStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateNullValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct JsonArray(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(JsonArray, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(JsonArray, windows_collections::IIterable<IJsonValue>, IJsonValue, super::super::Foundation::IStringable, windows_collections::IVector<IJsonValue>);
impl JsonArray {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<JsonArray, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn First(&self) -> windows_core::Result<windows_collections::IIterator<IJsonValue>> {
let this = &windows_core::Interface::cast::<windows_collections::IIterable<IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).First)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetObjectAt(&self, index: u32) -> windows_core::Result<JsonObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetObjectAt)(windows_core::Interface::as_raw(this), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetArrayAt(&self, index: u32) -> windows_core::Result<JsonArray> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetArrayAt)(windows_core::Interface::as_raw(this), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetStringAt(&self, index: u32) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetStringAt)(windows_core::Interface::as_raw(this), index, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetNumberAt(&self, index: u32) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNumberAt)(windows_core::Interface::as_raw(this), index, &mut result__).map(|| result__)
}
}
pub fn GetBooleanAt(&self, index: u32) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetBooleanAt)(windows_core::Interface::as_raw(this), index, &mut result__).map(|| result__)
}
}
pub fn Parse(input: &windows_core::HSTRING) -> windows_core::Result<JsonArray> {
Self::IJsonArrayStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Parse)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(input), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn TryParse(input: &windows_core::HSTRING, result: &mut Option<JsonArray>) -> windows_core::Result<bool> {
Self::IJsonArrayStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryParse)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(input), result as *mut _ as _, &mut result__).map(|| result__)
})
}
pub fn ValueType(&self) -> windows_core::Result<JsonValueType> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Stringify(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Stringify)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetNumber(&self) -> windows_core::Result<f64> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetBoolean(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetBoolean)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetArray(&self) -> windows_core::Result<JsonArray> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetArray)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetObject(&self) -> windows_core::Result<JsonObject> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetObject)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ToString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IStringable>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ToString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetAt(&self, index: u32) -> windows_core::Result<IJsonValue> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetAt)(windows_core::Interface::as_raw(this), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Size)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetView(&self) -> windows_core::Result<windows_collections::IVectorView<IJsonValue>> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IndexOf<P0>(&self, value: P0, index: &mut u32) -> windows_core::Result<bool>
where
P0: windows_core::Param<IJsonValue>,
{
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IndexOf)(windows_core::Interface::as_raw(this), value.param().abi(), index, &mut result__).map(|| result__)
}
}
pub fn SetAt<P1>(&self, index: u32, value: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IJsonValue>,
{
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).SetAt)(windows_core::Interface::as_raw(this), index, value.param().abi()).ok() }
}
pub fn InsertAt<P1>(&self, index: u32, value: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IJsonValue>,
{
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).InsertAt)(windows_core::Interface::as_raw(this), index, value.param().abi()).ok() }
}
pub fn RemoveAt(&self, index: u32) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemoveAt)(windows_core::Interface::as_raw(this), index).ok() }
}
pub fn Append<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IJsonValue>,
{
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).Append)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn RemoveAtEnd(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemoveAtEnd)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Clear(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).Clear)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn GetMany(&self, startindex: u32, items: &mut [Option<IJsonValue>]) -> windows_core::Result<u32> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetMany)(windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), core::mem::transmute_copy(&items), &mut result__).map(|| result__)
}
}
pub fn ReplaceAll(&self, items: &[Option<IJsonValue>]) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<windows_collections::IVector<IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).ReplaceAll)(windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), core::mem::transmute(items.as_ptr())).ok() }
}
fn IJsonArrayStatics<R, F: FnOnce(&IJsonArrayStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<JsonArray, IJsonArrayStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for JsonArray {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IJsonArray>();
}
unsafe impl windows_core::Interface for JsonArray {
type Vtable = <IJsonArray as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IJsonArray as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for JsonArray {
const NAME: &'static str = "Windows.Data.Json.JsonArray";
}
unsafe impl Send for JsonArray {}
unsafe impl Sync for JsonArray {}
impl IntoIterator for JsonArray {
type Item = IJsonValue;
type IntoIter = windows_collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
IntoIterator::into_iter(&self)
}
}
impl IntoIterator for &JsonArray {
type Item = IJsonValue;
type IntoIter = windows_collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
self.First().unwrap()
}
}
pub struct JsonError;
impl JsonError {
pub fn GetJsonStatus(hresult: i32) -> windows_core::Result<JsonErrorStatus> {
Self::IJsonErrorStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetJsonStatus)(windows_core::Interface::as_raw(this), hresult, &mut result__).map(|| result__)
})
}
fn IJsonErrorStatics2<R, F: FnOnce(&IJsonErrorStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<JsonError, IJsonErrorStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for JsonError {
const NAME: &'static str = "Windows.Data.Json.JsonError";
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct JsonErrorStatus(pub i32);
impl JsonErrorStatus {
pub const Unknown: Self = Self(0i32);
pub const InvalidJsonString: Self = Self(1i32);
pub const InvalidJsonNumber: Self = Self(2i32);
pub const JsonValueNotFound: Self = Self(3i32);
pub const ImplementationLimit: Self = Self(4i32);
}
impl windows_core::TypeKind for JsonErrorStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for JsonErrorStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Data.Json.JsonErrorStatus;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct JsonObject(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(JsonObject, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy ! ( JsonObject , windows_collections:: IIterable < windows_collections:: IKeyValuePair < windows_core::HSTRING , IJsonValue > > , IJsonValue , windows_collections:: IMap < windows_core::HSTRING , IJsonValue > , super::super::Foundation:: IStringable );
impl JsonObject {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<JsonObject, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn First(&self) -> windows_core::Result<windows_collections::IIterator<windows_collections::IKeyValuePair<windows_core::HSTRING, IJsonValue>>> {
let this = &windows_core::Interface::cast::<windows_collections::IIterable<windows_collections::IKeyValuePair<windows_core::HSTRING, IJsonValue>>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).First)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetNamedValue(&self, name: &windows_core::HSTRING) -> windows_core::Result<JsonValue> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedValue)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetNamedValue<P1>(&self, name: &windows_core::HSTRING, value: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IJsonValue>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetNamedValue)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), value.param().abi()).ok() }
}
pub fn GetNamedObject(&self, name: &windows_core::HSTRING) -> windows_core::Result<JsonObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedObject)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetNamedArray(&self, name: &windows_core::HSTRING) -> windows_core::Result<JsonArray> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedArray)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetNamedString(&self, name: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedString)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetNamedNumber(&self, name: &windows_core::HSTRING) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedNumber)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).map(|| result__)
}
}
pub fn GetNamedBoolean(&self, name: &windows_core::HSTRING) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedBoolean)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), &mut result__).map(|| result__)
}
}
pub fn Parse(input: &windows_core::HSTRING) -> windows_core::Result<JsonObject> {
Self::IJsonObjectStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Parse)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(input), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn TryParse(input: &windows_core::HSTRING, result: &mut Option<JsonObject>) -> windows_core::Result<bool> {
Self::IJsonObjectStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryParse)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(input), result as *mut _ as _, &mut result__).map(|| result__)
})
}
pub fn GetNamedValueOrDefault<P1>(&self, name: &windows_core::HSTRING, defaultvalue: P1) -> windows_core::Result<JsonValue>
where
P1: windows_core::Param<JsonValue>,
{
let this = &windows_core::Interface::cast::<IJsonObjectWithDefaultValues>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedValueOrDefault)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), defaultvalue.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetNamedObjectOrDefault<P1>(&self, name: &windows_core::HSTRING, defaultvalue: P1) -> windows_core::Result<JsonObject>
where
P1: windows_core::Param<JsonObject>,
{
let this = &windows_core::Interface::cast::<IJsonObjectWithDefaultValues>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedObjectOrDefault)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), defaultvalue.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetNamedStringOrDefault(&self, name: &windows_core::HSTRING, defaultvalue: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IJsonObjectWithDefaultValues>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedStringOrDefault)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), core::mem::transmute_copy(defaultvalue), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetNamedArrayOrDefault<P1>(&self, name: &windows_core::HSTRING, defaultvalue: P1) -> windows_core::Result<JsonArray>
where
P1: windows_core::Param<JsonArray>,
{
let this = &windows_core::Interface::cast::<IJsonObjectWithDefaultValues>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedArrayOrDefault)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), defaultvalue.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetNamedNumberOrDefault(&self, name: &windows_core::HSTRING, defaultvalue: f64) -> windows_core::Result<f64> {
let this = &windows_core::Interface::cast::<IJsonObjectWithDefaultValues>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedNumberOrDefault)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), defaultvalue, &mut result__).map(|| result__)
}
}
pub fn GetNamedBooleanOrDefault(&self, name: &windows_core::HSTRING, defaultvalue: bool) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IJsonObjectWithDefaultValues>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNamedBooleanOrDefault)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(name), defaultvalue, &mut result__).map(|| result__)
}
}
pub fn ValueType(&self) -> windows_core::Result<JsonValueType> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Stringify(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Stringify)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetNumber(&self) -> windows_core::Result<f64> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetBoolean(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetBoolean)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetArray(&self) -> windows_core::Result<JsonArray> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetArray)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetObject(&self) -> windows_core::Result<JsonObject> {
let this = &windows_core::Interface::cast::<IJsonValue>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetObject)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Lookup(&self, key: &windows_core::HSTRING) -> windows_core::Result<IJsonValue> {
let this = &windows_core::Interface::cast::<windows_collections::IMap<windows_core::HSTRING, IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Lookup)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(key), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
let this = &windows_core::Interface::cast::<windows_collections::IMap<windows_core::HSTRING, IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Size)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn HasKey(&self, key: &windows_core::HSTRING) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<windows_collections::IMap<windows_core::HSTRING, IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HasKey)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(key), &mut result__).map(|| result__)
}
}
pub fn GetView(&self) -> windows_core::Result<windows_collections::IMapView<windows_core::HSTRING, IJsonValue>> {
let this = &windows_core::Interface::cast::<windows_collections::IMap<windows_core::HSTRING, IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Insert<P1>(&self, key: &windows_core::HSTRING, value: P1) -> windows_core::Result<bool>
where
P1: windows_core::Param<IJsonValue>,
{
let this = &windows_core::Interface::cast::<windows_collections::IMap<windows_core::HSTRING, IJsonValue>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Insert)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(key), value.param().abi(), &mut result__).map(|| result__)
}
}
pub fn Remove(&self, key: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<windows_collections::IMap<windows_core::HSTRING, IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).Remove)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(key)).ok() }
}
pub fn Clear(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<windows_collections::IMap<windows_core::HSTRING, IJsonValue>>(self)?;
unsafe { (windows_core::Interface::vtable(this).Clear)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ToString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IStringable>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ToString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
fn IJsonObjectStatics<R, F: FnOnce(&IJsonObjectStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<JsonObject, IJsonObjectStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for JsonObject {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IJsonObject>();
}
unsafe impl windows_core::Interface for JsonObject {
type Vtable = <IJsonObject as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IJsonObject as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for JsonObject {
const NAME: &'static str = "Windows.Data.Json.JsonObject";
}
unsafe impl Send for JsonObject {}
unsafe impl Sync for JsonObject {}
impl IntoIterator for JsonObject {
type Item = windows_collections::IKeyValuePair<windows_core::HSTRING, IJsonValue>;
type IntoIter = windows_collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
IntoIterator::into_iter(&self)
}
}
impl IntoIterator for &JsonObject {
type Item = windows_collections::IKeyValuePair<windows_core::HSTRING, IJsonValue>;
type IntoIter = windows_collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
self.First().unwrap()
}
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct JsonValue(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(JsonValue, windows_core::IUnknown, windows_core::IInspectable, IJsonValue);
windows_core::imp::required_hierarchy!(JsonValue, super::super::Foundation::IStringable);
impl JsonValue {
pub fn ValueType(&self) -> windows_core::Result<JsonValueType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Stringify(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Stringify)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetNumber(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetBoolean(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetBoolean)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetArray(&self) -> windows_core::Result<JsonArray> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetArray)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetObject(&self) -> windows_core::Result<JsonObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetObject)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Parse(input: &windows_core::HSTRING) -> windows_core::Result<JsonValue> {
Self::IJsonValueStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Parse)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(input), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn TryParse(input: &windows_core::HSTRING, result: &mut Option<JsonValue>) -> windows_core::Result<bool> {
Self::IJsonValueStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryParse)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(input), result as *mut _ as _, &mut result__).map(|| result__)
})
}
pub fn CreateBooleanValue(input: bool) -> windows_core::Result<JsonValue> {
Self::IJsonValueStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateBooleanValue)(windows_core::Interface::as_raw(this), input, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateNumberValue(input: f64) -> windows_core::Result<JsonValue> {
Self::IJsonValueStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateNumberValue)(windows_core::Interface::as_raw(this), input, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateStringValue(input: &windows_core::HSTRING) -> windows_core::Result<JsonValue> {
Self::IJsonValueStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateStringValue)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(input), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateNullValue() -> windows_core::Result<JsonValue> {
Self::IJsonValueStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateNullValue)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ToString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IStringable>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ToString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
fn IJsonValueStatics<R, F: FnOnce(&IJsonValueStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<JsonValue, IJsonValueStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IJsonValueStatics2<R, F: FnOnce(&IJsonValueStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<JsonValue, IJsonValueStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for JsonValue {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IJsonValue>();
}
unsafe impl windows_core::Interface for JsonValue {
type Vtable = <IJsonValue as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IJsonValue as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for JsonValue {
const NAME: &'static str = "Windows.Data.Json.JsonValue";
}
unsafe impl Send for JsonValue {}
unsafe impl Sync for JsonValue {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct JsonValueType(pub i32);
impl JsonValueType {
pub const Null: Self = Self(0i32);
pub const Boolean: Self = Self(1i32);
pub const Number: Self = Self(2i32);
pub const String: Self = Self(3i32);
pub const Array: Self = Self(4i32);
pub const Object: Self = Self(5i32);
}
impl windows_core::TypeKind for JsonValueType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for JsonValueType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Data.Json.JsonValueType;i4)");
}
+433
View File
@@ -0,0 +1,433 @@
windows_core::imp::define_interface!(IPdfDocument, IPdfDocument_Vtbl, 0xac7ebedd_80fa_4089_846e_81b77ff5a86c);
impl windows_core::RuntimeType for IPdfDocument {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPdfDocument_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetPage: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PageCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub IsPasswordProtected: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPdfDocumentStatics, IPdfDocumentStatics_Vtbl, 0x433a0b5f_c007_4788_90f2_08143d922599);
impl windows_core::RuntimeType for IPdfDocumentStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPdfDocumentStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Streams")]
pub LoadFromFileAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
LoadFromFileAsync: usize,
#[cfg(feature = "Storage_Streams")]
pub LoadFromFileWithPasswordAsync: 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,
#[cfg(not(feature = "Storage_Streams"))]
LoadFromFileWithPasswordAsync: usize,
#[cfg(feature = "Storage_Streams")]
pub LoadFromStreamAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
LoadFromStreamAsync: usize,
#[cfg(feature = "Storage_Streams")]
pub LoadFromStreamWithPasswordAsync: 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,
#[cfg(not(feature = "Storage_Streams"))]
LoadFromStreamWithPasswordAsync: usize,
}
windows_core::imp::define_interface!(IPdfPage, IPdfPage_Vtbl, 0x9db4b0c8_5320_4cfc_ad76_493fdad0e594);
impl windows_core::RuntimeType for IPdfPage {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPdfPage_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Streams")]
pub RenderToStreamAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
RenderToStreamAsync: usize,
#[cfg(feature = "Storage_Streams")]
pub RenderWithOptionsToStreamAsync: 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,
#[cfg(not(feature = "Storage_Streams"))]
RenderWithOptionsToStreamAsync: usize,
pub PreparePageAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Index: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub Size: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Size) -> windows_core::HRESULT,
pub Dimensions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Rotation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PdfPageRotation) -> windows_core::HRESULT,
pub PreferredZoom: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPdfPageDimensions, IPdfPageDimensions_Vtbl, 0x22170471_313e_44e8_835d_63a3e7624a10);
impl windows_core::RuntimeType for IPdfPageDimensions {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPdfPageDimensions_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub MediaBox: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
pub CropBox: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
pub BleedBox: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
pub TrimBox: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
pub ArtBox: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPdfPageRenderOptions, IPdfPageRenderOptions_Vtbl, 0x3c98056f_b7cf_4c29_9a04_52d90267f425);
impl windows_core::RuntimeType for IPdfPageRenderOptions {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPdfPageRenderOptions_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SourceRect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
pub SetSourceRect: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::Rect) -> windows_core::HRESULT,
pub DestinationWidth: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetDestinationWidth: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub DestinationHeight: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetDestinationHeight: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
#[cfg(feature = "UI")]
pub BackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
BackgroundColor: usize,
#[cfg(feature = "UI")]
pub SetBackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetBackgroundColor: usize,
pub IsIgnoringHighContrast: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsIgnoringHighContrast: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub BitmapEncoderId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub SetBitmapEncoderId: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PdfDocument(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PdfDocument, windows_core::IUnknown, windows_core::IInspectable);
impl PdfDocument {
pub fn GetPage(&self, pageindex: u32) -> windows_core::Result<PdfPage> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPage)(windows_core::Interface::as_raw(this), pageindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn PageCount(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PageCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsPasswordProtected(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsPasswordProtected)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromFileAsync<P0>(file: P0) -> windows_core::Result<windows_future::IAsyncOperation<PdfDocument>>
where
P0: windows_core::Param<super::super::Storage::IStorageFile>,
{
Self::IPdfDocumentStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LoadFromFileAsync)(windows_core::Interface::as_raw(this), file.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromFileWithPasswordAsync<P0>(file: P0, password: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<PdfDocument>>
where
P0: windows_core::Param<super::super::Storage::IStorageFile>,
{
Self::IPdfDocumentStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LoadFromFileWithPasswordAsync)(windows_core::Interface::as_raw(this), file.param().abi(), core::mem::transmute_copy(password), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromStreamAsync<P0>(inputstream: P0) -> windows_core::Result<windows_future::IAsyncOperation<PdfDocument>>
where
P0: windows_core::Param<super::super::Storage::Streams::IRandomAccessStream>,
{
Self::IPdfDocumentStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LoadFromStreamAsync)(windows_core::Interface::as_raw(this), inputstream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromStreamWithPasswordAsync<P0>(inputstream: P0, password: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<PdfDocument>>
where
P0: windows_core::Param<super::super::Storage::Streams::IRandomAccessStream>,
{
Self::IPdfDocumentStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LoadFromStreamWithPasswordAsync)(windows_core::Interface::as_raw(this), inputstream.param().abi(), core::mem::transmute_copy(password), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPdfDocumentStatics<R, F: FnOnce(&IPdfDocumentStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PdfDocument, IPdfDocumentStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PdfDocument {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPdfDocument>();
}
unsafe impl windows_core::Interface for PdfDocument {
type Vtable = <IPdfDocument as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPdfDocument as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PdfDocument {
const NAME: &'static str = "Windows.Data.Pdf.PdfDocument";
}
unsafe impl Send for PdfDocument {}
unsafe impl Sync for PdfDocument {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PdfPage(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PdfPage, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(PdfPage, super::super::Foundation::IClosable);
impl PdfPage {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn RenderToStreamAsync<P0>(&self, outputstream: P0) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::super::Storage::Streams::IRandomAccessStream>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RenderToStreamAsync)(windows_core::Interface::as_raw(this), outputstream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn RenderWithOptionsToStreamAsync<P0, P1>(&self, outputstream: P0, options: P1) -> windows_core::Result<windows_future::IAsyncAction>
where
P0: windows_core::Param<super::super::Storage::Streams::IRandomAccessStream>,
P1: windows_core::Param<PdfPageRenderOptions>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RenderWithOptionsToStreamAsync)(windows_core::Interface::as_raw(this), outputstream.param().abi(), options.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn PreparePageAsync(&self) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PreparePageAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Index(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Index)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Size(&self) -> windows_core::Result<super::super::Foundation::Size> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Size)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Dimensions(&self) -> windows_core::Result<PdfPageDimensions> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Dimensions)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Rotation(&self) -> windows_core::Result<PdfPageRotation> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Rotation)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PreferredZoom(&self) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PreferredZoom)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PdfPage {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPdfPage>();
}
unsafe impl windows_core::Interface for PdfPage {
type Vtable = <IPdfPage as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPdfPage as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PdfPage {
const NAME: &'static str = "Windows.Data.Pdf.PdfPage";
}
unsafe impl Send for PdfPage {}
unsafe impl Sync for PdfPage {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PdfPageDimensions(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PdfPageDimensions, windows_core::IUnknown, windows_core::IInspectable);
impl PdfPageDimensions {
pub fn MediaBox(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MediaBox)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CropBox(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CropBox)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn BleedBox(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BleedBox)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn TrimBox(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TrimBox)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ArtBox(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ArtBox)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PdfPageDimensions {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPdfPageDimensions>();
}
unsafe impl windows_core::Interface for PdfPageDimensions {
type Vtable = <IPdfPageDimensions as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPdfPageDimensions as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PdfPageDimensions {
const NAME: &'static str = "Windows.Data.Pdf.PdfPageDimensions";
}
unsafe impl Send for PdfPageDimensions {}
unsafe impl Sync for PdfPageDimensions {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PdfPageRenderOptions(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PdfPageRenderOptions, windows_core::IUnknown, windows_core::IInspectable);
impl PdfPageRenderOptions {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PdfPageRenderOptions, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn SourceRect(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SourceRect)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetSourceRect(&self, value: super::super::Foundation::Rect) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSourceRect)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn DestinationWidth(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DestinationWidth)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDestinationWidth(&self, value: u32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDestinationWidth)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn DestinationHeight(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DestinationHeight)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDestinationHeight(&self, value: u32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDestinationHeight)(windows_core::Interface::as_raw(this), value).ok() }
}
#[cfg(feature = "UI")]
pub fn BackgroundColor(&self) -> windows_core::Result<super::super::UI::Color> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BackgroundColor)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "UI")]
pub fn SetBackgroundColor(&self, value: super::super::UI::Color) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetBackgroundColor)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsIgnoringHighContrast(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsIgnoringHighContrast)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsIgnoringHighContrast(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIsIgnoringHighContrast)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn BitmapEncoderId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BitmapEncoderId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetBitmapEncoderId(&self, value: windows_core::GUID) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetBitmapEncoderId)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for PdfPageRenderOptions {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPdfPageRenderOptions>();
}
unsafe impl windows_core::Interface for PdfPageRenderOptions {
type Vtable = <IPdfPageRenderOptions as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPdfPageRenderOptions as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PdfPageRenderOptions {
const NAME: &'static str = "Windows.Data.Pdf.PdfPageRenderOptions";
}
unsafe impl Send for PdfPageRenderOptions {}
unsafe impl Sync for PdfPageRenderOptions {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PdfPageRotation(pub i32);
impl PdfPageRotation {
pub const Normal: Self = Self(0i32);
pub const Rotate90: Self = Self(1i32);
pub const Rotate180: Self = Self(2i32);
pub const Rotate270: Self = Self(3i32);
}
impl windows_core::TypeKind for PdfPageRotation {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PdfPageRotation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Data.Pdf.PdfPageRotation;i4)");
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+93
View File
@@ -0,0 +1,93 @@
windows_core::imp::define_interface!(IXsltProcessor, IXsltProcessor_Vtbl, 0x7b64703f_550c_48c6_a90f_93a5b964518f);
impl windows_core::RuntimeType for IXsltProcessor {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IXsltProcessor_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Data_Xml_Dom")]
pub TransformToString: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Data_Xml_Dom"))]
TransformToString: usize,
}
windows_core::imp::define_interface!(IXsltProcessor2, IXsltProcessor2_Vtbl, 0x8da45c56_97a5_44cb_a8be_27d86280c70a);
impl windows_core::RuntimeType for IXsltProcessor2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IXsltProcessor2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Data_Xml_Dom")]
pub TransformToDocument: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Data_Xml_Dom"))]
TransformToDocument: usize,
}
windows_core::imp::define_interface!(IXsltProcessorFactory, IXsltProcessorFactory_Vtbl, 0x274146c0_9a51_4663_bf30_0ef742146f20);
impl windows_core::RuntimeType for IXsltProcessorFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IXsltProcessorFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Data_Xml_Dom")]
pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Data_Xml_Dom"))]
CreateInstance: usize,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct XsltProcessor(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(XsltProcessor, windows_core::IUnknown, windows_core::IInspectable);
impl XsltProcessor {
#[cfg(feature = "Data_Xml_Dom")]
pub fn TransformToString<P0>(&self, inputnode: P0) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<super::Dom::IXmlNode>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TransformToString)(windows_core::Interface::as_raw(this), inputnode.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "Data_Xml_Dom")]
pub fn TransformToDocument<P0>(&self, inputnode: P0) -> windows_core::Result<super::Dom::XmlDocument>
where
P0: windows_core::Param<super::Dom::IXmlNode>,
{
let this = &windows_core::Interface::cast::<IXsltProcessor2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TransformToDocument)(windows_core::Interface::as_raw(this), inputnode.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Data_Xml_Dom")]
pub fn CreateInstance<P0>(document: P0) -> windows_core::Result<XsltProcessor>
where
P0: windows_core::Param<super::Dom::XmlDocument>,
{
Self::IXsltProcessorFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateInstance)(windows_core::Interface::as_raw(this), document.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IXsltProcessorFactory<R, F: FnOnce(&IXsltProcessorFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<XsltProcessor, IXsltProcessorFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for XsltProcessor {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IXsltProcessor>();
}
unsafe impl windows_core::Interface for XsltProcessor {
type Vtable = <IXsltProcessor as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IXsltProcessor as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for XsltProcessor {
const NAME: &'static str = "Windows.Data.Xml.Xsl.XsltProcessor";
}
unsafe impl Send for XsltProcessor {}
unsafe impl Sync for XsltProcessor {}
+4
View File
@@ -0,0 +1,4 @@
#[cfg(feature = "Data_Xml_Dom")]
pub mod Dom;
#[cfg(feature = "Data_Xml_Xsl")]
pub mod Xsl;
+10
View File
@@ -0,0 +1,10 @@
#[cfg(feature = "Data_Html")]
pub mod Html;
#[cfg(feature = "Data_Json")]
pub mod Json;
#[cfg(feature = "Data_Pdf")]
pub mod Pdf;
#[cfg(feature = "Data_Text")]
pub mod Text;
#[cfg(feature = "Data_Xml")]
pub mod Xml;
+280
View File
@@ -0,0 +1,280 @@
windows_core::imp::define_interface!(IAdcControllerProvider, IAdcControllerProvider_Vtbl, 0xbe545828_816d_4de5_a048_aba06958aaa8);
impl windows_core::RuntimeType for IAdcControllerProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IAdcControllerProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IAdcControllerProvider {
pub fn ChannelCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChannelCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ResolutionInBits(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ResolutionInBits)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MinValue(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinValue)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MaxValue(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxValue)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ChannelMode(&self) -> windows_core::Result<ProviderAdcChannelMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChannelMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetChannelMode(&self, value: ProviderAdcChannelMode) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetChannelMode)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsChannelModeSupported(&self, channelmode: ProviderAdcChannelMode) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsChannelModeSupported)(windows_core::Interface::as_raw(this), channelmode, &mut result__).map(|| result__)
}
}
pub fn AcquireChannel(&self, channel: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).AcquireChannel)(windows_core::Interface::as_raw(this), channel).ok() }
}
pub fn ReleaseChannel(&self, channel: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReleaseChannel)(windows_core::Interface::as_raw(this), channel).ok() }
}
pub fn ReadValue(&self, channelnumber: i32) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReadValue)(windows_core::Interface::as_raw(this), channelnumber, &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeName for IAdcControllerProvider {
const NAME: &'static str = "Windows.Devices.Adc.Provider.IAdcControllerProvider";
}
pub trait IAdcControllerProvider_Impl: windows_core::IUnknownImpl {
fn ChannelCount(&self) -> windows_core::Result<i32>;
fn ResolutionInBits(&self) -> windows_core::Result<i32>;
fn MinValue(&self) -> windows_core::Result<i32>;
fn MaxValue(&self) -> windows_core::Result<i32>;
fn ChannelMode(&self) -> windows_core::Result<ProviderAdcChannelMode>;
fn SetChannelMode(&self, value: ProviderAdcChannelMode) -> windows_core::Result<()>;
fn IsChannelModeSupported(&self, channelMode: ProviderAdcChannelMode) -> windows_core::Result<bool>;
fn AcquireChannel(&self, channel: i32) -> windows_core::Result<()>;
fn ReleaseChannel(&self, channel: i32) -> windows_core::Result<()>;
fn ReadValue(&self, channelNumber: i32) -> windows_core::Result<i32>;
}
impl IAdcControllerProvider_Vtbl {
pub const fn new<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ChannelCount<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcControllerProvider_Impl::ChannelCount(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ResolutionInBits<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcControllerProvider_Impl::ResolutionInBits(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn MinValue<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcControllerProvider_Impl::MinValue(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn MaxValue<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcControllerProvider_Impl::MaxValue(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ChannelMode<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut ProviderAdcChannelMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcControllerProvider_Impl::ChannelMode(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetChannelMode<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: ProviderAdcChannelMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IAdcControllerProvider_Impl::SetChannelMode(this, value).into()
}
}
unsafe extern "system" fn IsChannelModeSupported<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, channelmode: ProviderAdcChannelMode, result__: *mut bool) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcControllerProvider_Impl::IsChannelModeSupported(this, channelmode) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AcquireChannel<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, channel: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IAdcControllerProvider_Impl::AcquireChannel(this, channel).into()
}
}
unsafe extern "system" fn ReleaseChannel<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, channel: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IAdcControllerProvider_Impl::ReleaseChannel(this, channel).into()
}
}
unsafe extern "system" fn ReadValue<Identity: IAdcControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, channelnumber: i32, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcControllerProvider_Impl::ReadValue(this, channelnumber) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IAdcControllerProvider, OFFSET>(),
ChannelCount: ChannelCount::<Identity, OFFSET>,
ResolutionInBits: ResolutionInBits::<Identity, OFFSET>,
MinValue: MinValue::<Identity, OFFSET>,
MaxValue: MaxValue::<Identity, OFFSET>,
ChannelMode: ChannelMode::<Identity, OFFSET>,
SetChannelMode: SetChannelMode::<Identity, OFFSET>,
IsChannelModeSupported: IsChannelModeSupported::<Identity, OFFSET>,
AcquireChannel: AcquireChannel::<Identity, OFFSET>,
ReleaseChannel: ReleaseChannel::<Identity, OFFSET>,
ReadValue: ReadValue::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IAdcControllerProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdcControllerProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ChannelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub ResolutionInBits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub MinValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub MaxValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub ChannelMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ProviderAdcChannelMode) -> windows_core::HRESULT,
pub SetChannelMode: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderAdcChannelMode) -> windows_core::HRESULT,
pub IsChannelModeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderAdcChannelMode, *mut bool) -> windows_core::HRESULT,
pub AcquireChannel: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub ReleaseChannel: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub ReadValue: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut i32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAdcProvider, IAdcProvider_Vtbl, 0x28953668_9359_4c57_bc88_e275e81638c9);
impl windows_core::RuntimeType for IAdcProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IAdcProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IAdcProvider {
pub fn GetControllers(&self) -> windows_core::Result<windows_collections::IVectorView<IAdcControllerProvider>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllers)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IAdcProvider {
const NAME: &'static str = "Windows.Devices.Adc.Provider.IAdcProvider";
}
pub trait IAdcProvider_Impl: windows_core::IUnknownImpl {
fn GetControllers(&self) -> windows_core::Result<windows_collections::IVectorView<IAdcControllerProvider>>;
}
impl IAdcProvider_Vtbl {
pub const fn new<Identity: IAdcProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetControllers<Identity: IAdcProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdcProvider_Impl::GetControllers(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IAdcProvider, OFFSET>(), GetControllers: GetControllers::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IAdcProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdcProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetControllers: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderAdcChannelMode(pub i32);
impl ProviderAdcChannelMode {
pub const SingleEnded: Self = Self(0i32);
pub const Differential: Self = Self(1i32);
}
impl windows_core::TypeKind for ProviderAdcChannelMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderAdcChannelMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Adc.Provider.ProviderAdcChannelMode;i4)");
}
+206
View File
@@ -0,0 +1,206 @@
#[cfg(feature = "Devices_Adc_Provider")]
pub mod Provider;
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AdcChannel(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AdcChannel, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(AdcChannel, super::super::Foundation::IClosable);
impl AdcChannel {
pub fn Controller(&self) -> windows_core::Result<AdcController> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Controller)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReadValue(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReadValue)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ReadRatio(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReadRatio)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for AdcChannel {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAdcChannel>();
}
unsafe impl windows_core::Interface for AdcChannel {
type Vtable = <IAdcChannel as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAdcChannel as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AdcChannel {
const NAME: &'static str = "Windows.Devices.Adc.AdcChannel";
}
unsafe impl Send for AdcChannel {}
unsafe impl Sync for AdcChannel {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AdcChannelMode(pub i32);
impl AdcChannelMode {
pub const SingleEnded: Self = Self(0i32);
pub const Differential: Self = Self(1i32);
}
impl windows_core::TypeKind for AdcChannelMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for AdcChannelMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Adc.AdcChannelMode;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AdcController(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AdcController, windows_core::IUnknown, windows_core::IInspectable);
impl AdcController {
pub fn ChannelCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChannelCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ResolutionInBits(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ResolutionInBits)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MinValue(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinValue)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MaxValue(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxValue)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ChannelMode(&self) -> windows_core::Result<AdcChannelMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChannelMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetChannelMode(&self, value: AdcChannelMode) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetChannelMode)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsChannelModeSupported(&self, channelmode: AdcChannelMode) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsChannelModeSupported)(windows_core::Interface::as_raw(this), channelmode, &mut result__).map(|| result__)
}
}
pub fn OpenChannel(&self, channelnumber: i32) -> windows_core::Result<AdcChannel> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenChannel)(windows_core::Interface::as_raw(this), channelnumber, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_Adc_Provider")]
pub fn GetControllersAsync<P0>(provider: P0) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<AdcController>>>
where
P0: windows_core::Param<Provider::IAdcProvider>,
{
Self::IAdcControllerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllersAsync)(windows_core::Interface::as_raw(this), provider.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDefaultAsync() -> windows_core::Result<windows_future::IAsyncOperation<AdcController>> {
Self::IAdcControllerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefaultAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IAdcControllerStatics<R, F: FnOnce(&IAdcControllerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AdcController, IAdcControllerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IAdcControllerStatics2<R, F: FnOnce(&IAdcControllerStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<AdcController, IAdcControllerStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for AdcController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IAdcController>();
}
unsafe impl windows_core::Interface for AdcController {
type Vtable = <IAdcController as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IAdcController as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for AdcController {
const NAME: &'static str = "Windows.Devices.Adc.AdcController";
}
unsafe impl Send for AdcController {}
unsafe impl Sync for AdcController {}
windows_core::imp::define_interface!(IAdcChannel, IAdcChannel_Vtbl, 0x040bf414_2588_4a56_abef_73a260acc60a);
impl windows_core::RuntimeType for IAdcChannel {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdcChannel_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Controller: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReadValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub ReadRatio: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAdcController, IAdcController_Vtbl, 0x2a76e4b0_a896_4219_86b6_ea8cdce98f56);
impl windows_core::RuntimeType for IAdcController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdcController_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ChannelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub ResolutionInBits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub MinValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub MaxValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub ChannelMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut AdcChannelMode) -> windows_core::HRESULT,
pub SetChannelMode: unsafe extern "system" fn(*mut core::ffi::c_void, AdcChannelMode) -> windows_core::HRESULT,
pub IsChannelModeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, AdcChannelMode, *mut bool) -> windows_core::HRESULT,
pub OpenChannel: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IAdcControllerStatics, IAdcControllerStatics_Vtbl, 0xcce98e0c_01f8_4891_bc3b_be53ef279ca4);
impl windows_core::RuntimeType for IAdcControllerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdcControllerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Adc_Provider")]
pub GetControllersAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Adc_Provider"))]
GetControllersAsync: usize,
}
windows_core::imp::define_interface!(IAdcControllerStatics2, IAdcControllerStatics2_Vtbl, 0xa2b93b1d_977b_4f5a_a5fe_a6abaffe6484);
impl windows_core::RuntimeType for IAdcControllerStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdcControllerStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefaultAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
+94
View File
@@ -0,0 +1,94 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DeviceServicingDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(DeviceServicingDetails, windows_core::IUnknown, windows_core::IInspectable);
impl DeviceServicingDetails {
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Arguments(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Arguments)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ExpectedDuration(&self) -> windows_core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ExpectedDuration)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for DeviceServicingDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IDeviceServicingDetails>();
}
unsafe impl windows_core::Interface for DeviceServicingDetails {
type Vtable = <IDeviceServicingDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IDeviceServicingDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for DeviceServicingDetails {
const NAME: &'static str = "Windows.Devices.Background.DeviceServicingDetails";
}
unsafe impl Send for DeviceServicingDetails {}
unsafe impl Sync for DeviceServicingDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DeviceUseDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(DeviceUseDetails, windows_core::IUnknown, windows_core::IInspectable);
impl DeviceUseDetails {
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Arguments(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Arguments)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for DeviceUseDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IDeviceUseDetails>();
}
unsafe impl windows_core::Interface for DeviceUseDetails {
type Vtable = <IDeviceUseDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IDeviceUseDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for DeviceUseDetails {
const NAME: &'static str = "Windows.Devices.Background.DeviceUseDetails";
}
unsafe impl Send for DeviceUseDetails {}
unsafe impl Sync for DeviceUseDetails {}
windows_core::imp::define_interface!(IDeviceServicingDetails, IDeviceServicingDetails_Vtbl, 0x4aabee29_2344_4ac4_8527_4a8ef6905645);
impl windows_core::RuntimeType for IDeviceServicingDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IDeviceServicingDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Arguments: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ExpectedDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IDeviceUseDetails, IDeviceUseDetails_Vtbl, 0x7d565141_557e_4154_b994_e4f7a11fb323);
impl windows_core::RuntimeType for IDeviceUseDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IDeviceUseDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Arguments: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,543 @@
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct BluetoothEventTriggeringMode(pub i32);
impl BluetoothEventTriggeringMode {
pub const Serial: Self = Self(0i32);
pub const Batch: Self = Self(1i32);
pub const KeepLatest: Self = Self(2i32);
}
impl windows_core::TypeKind for BluetoothEventTriggeringMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for BluetoothEventTriggeringMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Bluetooth.Background.BluetoothEventTriggeringMode;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct BluetoothLEAdvertisementPublisherTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(BluetoothLEAdvertisementPublisherTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl BluetoothLEAdvertisementPublisherTriggerDetails {
#[cfg(feature = "Devices_Bluetooth_Advertisement")]
pub fn Status(&self) -> windows_core::Result<super::Advertisement::BluetoothLEAdvertisementPublisherStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Error(&self) -> windows_core::Result<super::BluetoothError> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SelectedTransmitPowerLevelInDBm(&self) -> windows_core::Result<super::super::super::Foundation::IReference<i16>> {
let this = &windows_core::Interface::cast::<IBluetoothLEAdvertisementPublisherTriggerDetails2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SelectedTransmitPowerLevelInDBm)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for BluetoothLEAdvertisementPublisherTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IBluetoothLEAdvertisementPublisherTriggerDetails>();
}
unsafe impl windows_core::Interface for BluetoothLEAdvertisementPublisherTriggerDetails {
type Vtable = <IBluetoothLEAdvertisementPublisherTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IBluetoothLEAdvertisementPublisherTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for BluetoothLEAdvertisementPublisherTriggerDetails {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.BluetoothLEAdvertisementPublisherTriggerDetails";
}
unsafe impl Send for BluetoothLEAdvertisementPublisherTriggerDetails {}
unsafe impl Sync for BluetoothLEAdvertisementPublisherTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct BluetoothLEAdvertisementWatcherTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(BluetoothLEAdvertisementWatcherTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl BluetoothLEAdvertisementWatcherTriggerDetails {
pub fn Error(&self) -> windows_core::Result<super::BluetoothError> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Devices_Bluetooth_Advertisement")]
pub fn Advertisements(&self) -> windows_core::Result<windows_collections::IVectorView<super::Advertisement::BluetoothLEAdvertisementReceivedEventArgs>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Advertisements)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SignalStrengthFilter(&self) -> windows_core::Result<super::BluetoothSignalStrengthFilter> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SignalStrengthFilter)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for BluetoothLEAdvertisementWatcherTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IBluetoothLEAdvertisementWatcherTriggerDetails>();
}
unsafe impl windows_core::Interface for BluetoothLEAdvertisementWatcherTriggerDetails {
type Vtable = <IBluetoothLEAdvertisementWatcherTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IBluetoothLEAdvertisementWatcherTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for BluetoothLEAdvertisementWatcherTriggerDetails {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.BluetoothLEAdvertisementWatcherTriggerDetails";
}
unsafe impl Send for BluetoothLEAdvertisementWatcherTriggerDetails {}
unsafe impl Sync for BluetoothLEAdvertisementWatcherTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GattCharacteristicNotificationTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GattCharacteristicNotificationTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl GattCharacteristicNotificationTriggerDetails {
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub fn Characteristic(&self) -> windows_core::Result<super::GenericAttributeProfile::GattCharacteristic> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Characteristic)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn Value(&self) -> windows_core::Result<super::super::super::Storage::Streams::IBuffer> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Value)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Error(&self) -> windows_core::Result<super::BluetoothError> {
let this = &windows_core::Interface::cast::<IGattCharacteristicNotificationTriggerDetails2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn EventTriggeringMode(&self) -> windows_core::Result<BluetoothEventTriggeringMode> {
let this = &windows_core::Interface::cast::<IGattCharacteristicNotificationTriggerDetails2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EventTriggeringMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub fn ValueChangedEvents(&self) -> windows_core::Result<windows_collections::IVectorView<super::GenericAttributeProfile::GattValueChangedEventArgs>> {
let this = &windows_core::Interface::cast::<IGattCharacteristicNotificationTriggerDetails2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueChangedEvents)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GattCharacteristicNotificationTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGattCharacteristicNotificationTriggerDetails>();
}
unsafe impl windows_core::Interface for GattCharacteristicNotificationTriggerDetails {
type Vtable = <IGattCharacteristicNotificationTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGattCharacteristicNotificationTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GattCharacteristicNotificationTriggerDetails {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.GattCharacteristicNotificationTriggerDetails";
}
unsafe impl Send for GattCharacteristicNotificationTriggerDetails {}
unsafe impl Sync for GattCharacteristicNotificationTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GattServiceProviderConnection(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GattServiceProviderConnection, windows_core::IUnknown, windows_core::IInspectable);
impl GattServiceProviderConnection {
pub fn TriggerId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TriggerId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub fn Service(&self) -> windows_core::Result<super::GenericAttributeProfile::GattLocalService> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Service)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub fn UpdateAdvertisingParameters<P0>(&self, parameters: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::GenericAttributeProfile::GattServiceProviderAdvertisingParameters>,
{
let this = &windows_core::Interface::cast::<IGattServiceProviderConnection2>(self)?;
unsafe { (windows_core::Interface::vtable(this).UpdateAdvertisingParameters)(windows_core::Interface::as_raw(this), parameters.param().abi()).ok() }
}
pub fn AllServices() -> windows_core::Result<windows_collections::IMapView<windows_core::HSTRING, GattServiceProviderConnection>> {
Self::IGattServiceProviderConnectionStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AllServices)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGattServiceProviderConnectionStatics<R, F: FnOnce(&IGattServiceProviderConnectionStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GattServiceProviderConnection, IGattServiceProviderConnectionStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for GattServiceProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGattServiceProviderConnection>();
}
unsafe impl windows_core::Interface for GattServiceProviderConnection {
type Vtable = <IGattServiceProviderConnection as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGattServiceProviderConnection as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GattServiceProviderConnection {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.GattServiceProviderConnection";
}
unsafe impl Send for GattServiceProviderConnection {}
unsafe impl Sync for GattServiceProviderConnection {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GattServiceProviderTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GattServiceProviderTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl GattServiceProviderTriggerDetails {
pub fn Connection(&self) -> windows_core::Result<GattServiceProviderConnection> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Connection)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GattServiceProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGattServiceProviderTriggerDetails>();
}
unsafe impl windows_core::Interface for GattServiceProviderTriggerDetails {
type Vtable = <IGattServiceProviderTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGattServiceProviderTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GattServiceProviderTriggerDetails {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.GattServiceProviderTriggerDetails";
}
unsafe impl Send for GattServiceProviderTriggerDetails {}
unsafe impl Sync for GattServiceProviderTriggerDetails {}
windows_core::imp::define_interface!(IBluetoothLEAdvertisementPublisherTriggerDetails, IBluetoothLEAdvertisementPublisherTriggerDetails_Vtbl, 0x610eca86_3480_41c9_a918_7ddadf207e00);
impl windows_core::RuntimeType for IBluetoothLEAdvertisementPublisherTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IBluetoothLEAdvertisementPublisherTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Bluetooth_Advertisement")]
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::Advertisement::BluetoothLEAdvertisementPublisherStatus) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_Advertisement"))]
Status: usize,
pub Error: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::BluetoothError) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IBluetoothLEAdvertisementPublisherTriggerDetails2, IBluetoothLEAdvertisementPublisherTriggerDetails2_Vtbl, 0xd4a3d025_c601_42d6_9829_4ccb3f5cd77f);
impl windows_core::RuntimeType for IBluetoothLEAdvertisementPublisherTriggerDetails2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IBluetoothLEAdvertisementPublisherTriggerDetails2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SelectedTransmitPowerLevelInDBm: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IBluetoothLEAdvertisementWatcherTriggerDetails, IBluetoothLEAdvertisementWatcherTriggerDetails_Vtbl, 0xa7db5ad7_2257_4e69_9784_fee645c1dce0);
impl windows_core::RuntimeType for IBluetoothLEAdvertisementWatcherTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IBluetoothLEAdvertisementWatcherTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Error: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::BluetoothError) -> windows_core::HRESULT,
#[cfg(feature = "Devices_Bluetooth_Advertisement")]
pub Advertisements: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_Advertisement"))]
Advertisements: usize,
pub SignalStrengthFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGattCharacteristicNotificationTriggerDetails, IGattCharacteristicNotificationTriggerDetails_Vtbl, 0x9ba03b18_0fec_436a_93b1_f46c697532a2);
impl windows_core::RuntimeType for IGattCharacteristicNotificationTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGattCharacteristicNotificationTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub Characteristic: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_GenericAttributeProfile"))]
Characteristic: usize,
#[cfg(feature = "Storage_Streams")]
pub Value: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
Value: usize,
}
windows_core::imp::define_interface!(IGattCharacteristicNotificationTriggerDetails2, IGattCharacteristicNotificationTriggerDetails2_Vtbl, 0x727a50dc_949d_454a_b192_983467e3d50f);
impl windows_core::RuntimeType for IGattCharacteristicNotificationTriggerDetails2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGattCharacteristicNotificationTriggerDetails2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Error: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::BluetoothError) -> windows_core::HRESULT,
pub EventTriggeringMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut BluetoothEventTriggeringMode) -> windows_core::HRESULT,
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub ValueChangedEvents: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_GenericAttributeProfile"))]
ValueChangedEvents: usize,
}
windows_core::imp::define_interface!(IGattServiceProviderConnection, IGattServiceProviderConnection_Vtbl, 0x7fa1b9b9_2f13_40b5_9582_8eb78e98ef13);
impl windows_core::RuntimeType for IGattServiceProviderConnection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGattServiceProviderConnection_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TriggerId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub Service: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_GenericAttributeProfile"))]
Service: usize,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGattServiceProviderConnection2, IGattServiceProviderConnection2_Vtbl, 0x90d12be0_ebc0_484f_ae0a_7eb8b6266bac);
impl windows_core::RuntimeType for IGattServiceProviderConnection2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGattServiceProviderConnection2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Bluetooth_GenericAttributeProfile")]
pub UpdateAdvertisingParameters: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_GenericAttributeProfile"))]
UpdateAdvertisingParameters: usize,
}
windows_core::imp::define_interface!(IGattServiceProviderConnectionStatics, IGattServiceProviderConnectionStatics_Vtbl, 0x3d509f4b_0b0e_4466_b8cd_6ebdda1fa17d);
impl windows_core::RuntimeType for IGattServiceProviderConnectionStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGattServiceProviderConnectionStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AllServices: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGattServiceProviderTriggerDetails, IGattServiceProviderTriggerDetails_Vtbl, 0xae8c0625_05ff_4afb_b16a_de95f3cf0158);
impl windows_core::RuntimeType for IGattServiceProviderTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGattServiceProviderTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Connection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommConnectionTriggerDetails, IRfcommConnectionTriggerDetails_Vtbl, 0xf922734d_2e3c_4efc_ab59_fc5cf96f97e3);
impl windows_core::RuntimeType for IRfcommConnectionTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommConnectionTriggerDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Networking_Sockets")]
pub Socket: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Networking_Sockets"))]
Socket: usize,
pub Incoming: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub RemoteDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommInboundConnectionInformation, IRfcommInboundConnectionInformation_Vtbl, 0x6d3e75a8_5429_4059_92e3_1e8b65528707);
impl windows_core::RuntimeType for IRfcommInboundConnectionInformation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommInboundConnectionInformation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Streams")]
pub SdpRecord: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SdpRecord: usize,
#[cfg(feature = "Storage_Streams")]
pub SetSdpRecord: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SetSdpRecord: usize,
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub LocalServiceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_Rfcomm"))]
LocalServiceId: usize,
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub SetLocalServiceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_Rfcomm"))]
SetLocalServiceId: usize,
pub ServiceCapabilities: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::BluetoothServiceCapabilities) -> windows_core::HRESULT,
pub SetServiceCapabilities: unsafe extern "system" fn(*mut core::ffi::c_void, super::BluetoothServiceCapabilities) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommOutboundConnectionInformation, IRfcommOutboundConnectionInformation_Vtbl, 0xb091227b_f434_4cb0_99b1_4ab8cedaedd7);
impl windows_core::RuntimeType for IRfcommOutboundConnectionInformation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommOutboundConnectionInformation_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub RemoteServiceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_Rfcomm"))]
RemoteServiceId: usize,
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub SetRemoteServiceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Bluetooth_Rfcomm"))]
SetRemoteServiceId: usize,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RfcommConnectionTriggerDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RfcommConnectionTriggerDetails, windows_core::IUnknown, windows_core::IInspectable);
impl RfcommConnectionTriggerDetails {
#[cfg(feature = "Networking_Sockets")]
pub fn Socket(&self) -> windows_core::Result<super::super::super::Networking::Sockets::StreamSocket> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Socket)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Incoming(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Incoming)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn RemoteDevice(&self) -> windows_core::Result<super::BluetoothDevice> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RemoteDevice)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for RfcommConnectionTriggerDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRfcommConnectionTriggerDetails>();
}
unsafe impl windows_core::Interface for RfcommConnectionTriggerDetails {
type Vtable = <IRfcommConnectionTriggerDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRfcommConnectionTriggerDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RfcommConnectionTriggerDetails {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.RfcommConnectionTriggerDetails";
}
unsafe impl Send for RfcommConnectionTriggerDetails {}
unsafe impl Sync for RfcommConnectionTriggerDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RfcommInboundConnectionInformation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RfcommInboundConnectionInformation, windows_core::IUnknown, windows_core::IInspectable);
impl RfcommInboundConnectionInformation {
#[cfg(feature = "Storage_Streams")]
pub fn SdpRecord(&self) -> windows_core::Result<super::super::super::Storage::Streams::IBuffer> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SdpRecord)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn SetSdpRecord<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Storage::Streams::IBuffer>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSdpRecord)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub fn LocalServiceId(&self) -> windows_core::Result<super::Rfcomm::RfcommServiceId> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LocalServiceId)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub fn SetLocalServiceId<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::Rfcomm::RfcommServiceId>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetLocalServiceId)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
pub fn ServiceCapabilities(&self) -> windows_core::Result<super::BluetoothServiceCapabilities> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ServiceCapabilities)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetServiceCapabilities(&self, value: super::BluetoothServiceCapabilities) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetServiceCapabilities)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for RfcommInboundConnectionInformation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRfcommInboundConnectionInformation>();
}
unsafe impl windows_core::Interface for RfcommInboundConnectionInformation {
type Vtable = <IRfcommInboundConnectionInformation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRfcommInboundConnectionInformation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RfcommInboundConnectionInformation {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.RfcommInboundConnectionInformation";
}
unsafe impl Send for RfcommInboundConnectionInformation {}
unsafe impl Sync for RfcommInboundConnectionInformation {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RfcommOutboundConnectionInformation(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RfcommOutboundConnectionInformation, windows_core::IUnknown, windows_core::IInspectable);
impl RfcommOutboundConnectionInformation {
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub fn RemoteServiceId(&self) -> windows_core::Result<super::Rfcomm::RfcommServiceId> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RemoteServiceId)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_Bluetooth_Rfcomm")]
pub fn SetRemoteServiceId<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::Rfcomm::RfcommServiceId>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetRemoteServiceId)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
}
impl windows_core::RuntimeType for RfcommOutboundConnectionInformation {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRfcommOutboundConnectionInformation>();
}
unsafe impl windows_core::Interface for RfcommOutboundConnectionInformation {
type Vtable = <IRfcommOutboundConnectionInformation as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRfcommOutboundConnectionInformation as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RfcommOutboundConnectionInformation {
const NAME: &'static str = "Windows.Devices.Bluetooth.Background.RfcommOutboundConnectionInformation";
}
unsafe impl Send for RfcommOutboundConnectionInformation {}
unsafe impl Sync for RfcommOutboundConnectionInformation {}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,514 @@
windows_core::imp::define_interface!(IRfcommDeviceService, IRfcommDeviceService_Vtbl, 0xae81ff1f_c5a1_4c40_8c28_f3efd69062f3);
impl windows_core::RuntimeType for IRfcommDeviceService {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommDeviceService_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Networking")]
pub ConnectionHostName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Networking"))]
ConnectionHostName: usize,
pub ConnectionServiceName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ServiceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Networking_Sockets")]
pub ProtectionLevel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Networking::Sockets::SocketProtectionLevel) -> windows_core::HRESULT,
#[cfg(not(feature = "Networking_Sockets"))]
ProtectionLevel: usize,
#[cfg(feature = "Networking_Sockets")]
pub MaxProtectionLevel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Networking::Sockets::SocketProtectionLevel) -> windows_core::HRESULT,
#[cfg(not(feature = "Networking_Sockets"))]
MaxProtectionLevel: usize,
#[cfg(feature = "Storage_Streams")]
pub GetSdpRawAttributesAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
GetSdpRawAttributesAsync: usize,
#[cfg(feature = "Storage_Streams")]
pub GetSdpRawAttributesWithCacheModeAsync: unsafe extern "system" fn(*mut core::ffi::c_void, super::BluetoothCacheMode, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
GetSdpRawAttributesWithCacheModeAsync: usize,
}
windows_core::imp::define_interface!(IRfcommDeviceService2, IRfcommDeviceService2_Vtbl, 0x536ced14_ebcd_49fe_bf9f_40efc689b20d);
impl windows_core::RuntimeType for IRfcommDeviceService2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommDeviceService2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Device: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommDeviceService3, IRfcommDeviceService3_Vtbl, 0x1c22ace6_dd44_4d23_866d_8f3486ee6490);
impl windows_core::RuntimeType for IRfcommDeviceService3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommDeviceService3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Enumeration")]
pub DeviceAccessInformation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Enumeration"))]
DeviceAccessInformation: usize,
#[cfg(feature = "Devices_Enumeration")]
pub RequestAccessAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Enumeration"))]
RequestAccessAsync: usize,
}
windows_core::imp::define_interface!(IRfcommDeviceServiceStatics, IRfcommDeviceServiceStatics_Vtbl, 0xa4a149ef_626d_41ac_b253_87ac5c27e28a);
impl windows_core::RuntimeType for IRfcommDeviceServiceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommDeviceServiceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommDeviceServiceStatics2, IRfcommDeviceServiceStatics2_Vtbl, 0xaa8cb1c9_e78d_4be4_8076_0a3d87a0a05f);
impl windows_core::RuntimeType for IRfcommDeviceServiceStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommDeviceServiceStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelectorForBluetoothDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelectorForBluetoothDeviceWithCacheMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::BluetoothCacheMode, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelectorForBluetoothDeviceAndServiceId: 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,
pub GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, super::BluetoothCacheMode, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommDeviceServicesResult, IRfcommDeviceServicesResult_Vtbl, 0x3b48388c_7ccf_488e_9625_d259a5732d55);
impl windows_core::RuntimeType for IRfcommDeviceServicesResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommDeviceServicesResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Error: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::BluetoothError) -> windows_core::HRESULT,
pub Services: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommServiceId, IRfcommServiceId_Vtbl, 0x22629204_7e02_4017_8136_da1b6a1b9bbf);
impl windows_core::RuntimeType for IRfcommServiceId {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommServiceId_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Uuid: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub AsShortId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AsString: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommServiceIdStatics, IRfcommServiceIdStatics_Vtbl, 0x2a179eba_a975_46e3_b56b_08ffd783a5fe);
impl windows_core::RuntimeType for IRfcommServiceIdStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommServiceIdStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FromUuid: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromShortId: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SerialPort: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ObexObjectPush: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ObexFileTransfer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PhoneBookAccessPce: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PhoneBookAccessPse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GenericFileTransfer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommServiceProvider, IRfcommServiceProvider_Vtbl, 0xeadbfdc4_b1f6_44ff_9f7c_e7a82ab86821);
impl windows_core::RuntimeType for IRfcommServiceProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommServiceProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ServiceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Storage_Streams")]
pub SdpRawAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SdpRawAttributes: usize,
#[cfg(feature = "Networking_Sockets")]
pub StartAdvertising: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Networking_Sockets"))]
StartAdvertising: usize,
pub StopAdvertising: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IRfcommServiceProvider2, IRfcommServiceProvider2_Vtbl, 0x736bdfc6_3c81_4d1e_baf2_ddbb81284512);
impl windows_core::RuntimeType for IRfcommServiceProvider2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommServiceProvider2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Networking_Sockets")]
pub StartAdvertisingWithRadioDiscoverability: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, bool) -> windows_core::HRESULT,
#[cfg(not(feature = "Networking_Sockets"))]
StartAdvertisingWithRadioDiscoverability: usize,
}
windows_core::imp::define_interface!(IRfcommServiceProviderStatics, IRfcommServiceProviderStatics_Vtbl, 0x98888303_69ca_413a_84f7_4344c7292997);
impl windows_core::RuntimeType for IRfcommServiceProviderStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IRfcommServiceProviderStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RfcommDeviceService(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RfcommDeviceService, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(RfcommDeviceService, super::super::super::Foundation::IClosable);
impl RfcommDeviceService {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
#[cfg(feature = "Networking")]
pub fn ConnectionHostName(&self) -> windows_core::Result<super::super::super::Networking::HostName> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ConnectionHostName)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ConnectionServiceName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ConnectionServiceName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ServiceId(&self) -> windows_core::Result<RfcommServiceId> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ServiceId)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Networking_Sockets")]
pub fn ProtectionLevel(&self) -> windows_core::Result<super::super::super::Networking::Sockets::SocketProtectionLevel> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ProtectionLevel)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Networking_Sockets")]
pub fn MaxProtectionLevel(&self) -> windows_core::Result<super::super::super::Networking::Sockets::SocketProtectionLevel> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxProtectionLevel)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Storage_Streams")]
pub fn GetSdpRawAttributesAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IMapView<u32, super::super::super::Storage::Streams::IBuffer>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetSdpRawAttributesAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn GetSdpRawAttributesWithCacheModeAsync(&self, cachemode: super::BluetoothCacheMode) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IMapView<u32, super::super::super::Storage::Streams::IBuffer>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetSdpRawAttributesWithCacheModeAsync)(windows_core::Interface::as_raw(this), cachemode, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Device(&self) -> windows_core::Result<super::BluetoothDevice> {
let this = &windows_core::Interface::cast::<IRfcommDeviceService2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Device)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_Enumeration")]
pub fn DeviceAccessInformation(&self) -> windows_core::Result<super::super::Enumeration::DeviceAccessInformation> {
let this = &windows_core::Interface::cast::<IRfcommDeviceService3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceAccessInformation)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_Enumeration")]
pub fn RequestAccessAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Enumeration::DeviceAccessStatus>> {
let this = &windows_core::Interface::cast::<IRfcommDeviceService3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestAccessAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<RfcommDeviceService>> {
Self::IRfcommDeviceServiceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDeviceSelector<P0>(serviceid: P0) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<RfcommServiceId>,
{
Self::IRfcommDeviceServiceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), serviceid.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetDeviceSelectorForBluetoothDevice<P0>(bluetoothdevice: P0) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<super::BluetoothDevice>,
{
Self::IRfcommDeviceServiceStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorForBluetoothDevice)(windows_core::Interface::as_raw(this), bluetoothdevice.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetDeviceSelectorForBluetoothDeviceWithCacheMode<P0>(bluetoothdevice: P0, cachemode: super::BluetoothCacheMode) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<super::BluetoothDevice>,
{
Self::IRfcommDeviceServiceStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorForBluetoothDeviceWithCacheMode)(windows_core::Interface::as_raw(this), bluetoothdevice.param().abi(), cachemode, &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetDeviceSelectorForBluetoothDeviceAndServiceId<P0, P1>(bluetoothdevice: P0, serviceid: P1) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<super::BluetoothDevice>,
P1: windows_core::Param<RfcommServiceId>,
{
Self::IRfcommDeviceServiceStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorForBluetoothDeviceAndServiceId)(windows_core::Interface::as_raw(this), bluetoothdevice.param().abi(), serviceid.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode<P0, P1>(bluetoothdevice: P0, serviceid: P1, cachemode: super::BluetoothCacheMode) -> windows_core::Result<windows_core::HSTRING>
where
P0: windows_core::Param<super::BluetoothDevice>,
P1: windows_core::Param<RfcommServiceId>,
{
Self::IRfcommDeviceServiceStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorForBluetoothDeviceAndServiceIdWithCacheMode)(windows_core::Interface::as_raw(this), bluetoothdevice.param().abi(), serviceid.param().abi(), cachemode, &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IRfcommDeviceServiceStatics<R, F: FnOnce(&IRfcommDeviceServiceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<RfcommDeviceService, IRfcommDeviceServiceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IRfcommDeviceServiceStatics2<R, F: FnOnce(&IRfcommDeviceServiceStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<RfcommDeviceService, IRfcommDeviceServiceStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for RfcommDeviceService {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRfcommDeviceService>();
}
unsafe impl windows_core::Interface for RfcommDeviceService {
type Vtable = <IRfcommDeviceService as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRfcommDeviceService as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RfcommDeviceService {
const NAME: &'static str = "Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceService";
}
unsafe impl Send for RfcommDeviceService {}
unsafe impl Sync for RfcommDeviceService {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RfcommDeviceServicesResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RfcommDeviceServicesResult, windows_core::IUnknown, windows_core::IInspectable);
impl RfcommDeviceServicesResult {
pub fn Error(&self) -> windows_core::Result<super::BluetoothError> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Services(&self) -> windows_core::Result<windows_collections::IVectorView<RfcommDeviceService>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Services)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for RfcommDeviceServicesResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRfcommDeviceServicesResult>();
}
unsafe impl windows_core::Interface for RfcommDeviceServicesResult {
type Vtable = <IRfcommDeviceServicesResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRfcommDeviceServicesResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RfcommDeviceServicesResult {
const NAME: &'static str = "Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceServicesResult";
}
unsafe impl Send for RfcommDeviceServicesResult {}
unsafe impl Sync for RfcommDeviceServicesResult {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RfcommServiceId(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RfcommServiceId, windows_core::IUnknown, windows_core::IInspectable);
impl RfcommServiceId {
pub fn Uuid(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Uuid)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn AsShortId(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AsShortId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn AsString(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AsString)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn FromUuid(uuid: windows_core::GUID) -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromUuid)(windows_core::Interface::as_raw(this), uuid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn FromShortId(shortid: u32) -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromShortId)(windows_core::Interface::as_raw(this), shortid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn SerialPort() -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SerialPort)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ObexObjectPush() -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ObexObjectPush)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ObexFileTransfer() -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ObexFileTransfer)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn PhoneBookAccessPce() -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhoneBookAccessPce)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn PhoneBookAccessPse() -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhoneBookAccessPse)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GenericFileTransfer() -> windows_core::Result<RfcommServiceId> {
Self::IRfcommServiceIdStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GenericFileTransfer)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IRfcommServiceIdStatics<R, F: FnOnce(&IRfcommServiceIdStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<RfcommServiceId, IRfcommServiceIdStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for RfcommServiceId {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRfcommServiceId>();
}
unsafe impl windows_core::Interface for RfcommServiceId {
type Vtable = <IRfcommServiceId as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRfcommServiceId as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RfcommServiceId {
const NAME: &'static str = "Windows.Devices.Bluetooth.Rfcomm.RfcommServiceId";
}
unsafe impl Send for RfcommServiceId {}
unsafe impl Sync for RfcommServiceId {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RfcommServiceProvider(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(RfcommServiceProvider, windows_core::IUnknown, windows_core::IInspectable);
impl RfcommServiceProvider {
pub fn ServiceId(&self) -> windows_core::Result<RfcommServiceId> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ServiceId)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn SdpRawAttributes(&self) -> windows_core::Result<windows_collections::IMap<u32, super::super::super::Storage::Streams::IBuffer>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SdpRawAttributes)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Networking_Sockets")]
pub fn StartAdvertising<P0>(&self, listener: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Networking::Sockets::StreamSocketListener>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).StartAdvertising)(windows_core::Interface::as_raw(this), listener.param().abi()).ok() }
}
pub fn StopAdvertising(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).StopAdvertising)(windows_core::Interface::as_raw(this)).ok() }
}
#[cfg(feature = "Networking_Sockets")]
pub fn StartAdvertisingWithRadioDiscoverability<P0>(&self, listener: P0, radiodiscoverable: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::super::Networking::Sockets::StreamSocketListener>,
{
let this = &windows_core::Interface::cast::<IRfcommServiceProvider2>(self)?;
unsafe { (windows_core::Interface::vtable(this).StartAdvertisingWithRadioDiscoverability)(windows_core::Interface::as_raw(this), listener.param().abi(), radiodiscoverable).ok() }
}
pub fn CreateAsync<P0>(serviceid: P0) -> windows_core::Result<windows_future::IAsyncOperation<RfcommServiceProvider>>
where
P0: windows_core::Param<RfcommServiceId>,
{
Self::IRfcommServiceProviderStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateAsync)(windows_core::Interface::as_raw(this), serviceid.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IRfcommServiceProviderStatics<R, F: FnOnce(&IRfcommServiceProviderStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<RfcommServiceProvider, IRfcommServiceProviderStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for RfcommServiceProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IRfcommServiceProvider>();
}
unsafe impl windows_core::Interface for RfcommServiceProvider {
type Vtable = <IRfcommServiceProvider as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRfcommServiceProvider as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RfcommServiceProvider {
const NAME: &'static str = "Windows.Devices.Bluetooth.Rfcomm.RfcommServiceProvider";
}
unsafe impl Send for RfcommServiceProvider {}
unsafe impl Sync for RfcommServiceProvider {}
File diff suppressed because it is too large Load Diff
+405
View File
@@ -0,0 +1,405 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CustomDevice(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(CustomDevice, windows_core::IUnknown, windows_core::IInspectable);
impl CustomDevice {
#[cfg(feature = "Storage_Streams")]
pub fn InputStream(&self) -> windows_core::Result<super::super::Storage::Streams::IInputStream> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InputStream)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn OutputStream(&self) -> windows_core::Result<super::super::Storage::Streams::IOutputStream> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutputStream)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn SendIOControlAsync<P0, P1, P2>(&self, iocontrolcode: P0, inputbuffer: P1, outputbuffer: P2) -> windows_core::Result<windows_future::IAsyncOperation<u32>>
where
P0: windows_core::Param<IIOControlCode>,
P1: windows_core::Param<super::super::Storage::Streams::IBuffer>,
P2: windows_core::Param<super::super::Storage::Streams::IBuffer>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SendIOControlAsync)(windows_core::Interface::as_raw(this), iocontrolcode.param().abi(), inputbuffer.param().abi(), outputbuffer.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn TrySendIOControlAsync<P0, P1, P2>(&self, iocontrolcode: P0, inputbuffer: P1, outputbuffer: P2) -> windows_core::Result<windows_future::IAsyncOperation<bool>>
where
P0: windows_core::Param<IIOControlCode>,
P1: windows_core::Param<super::super::Storage::Streams::IBuffer>,
P2: windows_core::Param<super::super::Storage::Streams::IBuffer>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TrySendIOControlAsync)(windows_core::Interface::as_raw(this), iocontrolcode.param().abi(), inputbuffer.param().abi(), outputbuffer.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetDeviceSelector(classguid: windows_core::GUID) -> windows_core::Result<windows_core::HSTRING> {
Self::ICustomDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), classguid, &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING, desiredaccess: DeviceAccessMode, sharingmode: DeviceSharingMode) -> windows_core::Result<windows_future::IAsyncOperation<CustomDevice>> {
Self::ICustomDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), desiredaccess, sharingmode, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn ICustomDeviceStatics<R, F: FnOnce(&ICustomDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<CustomDevice, ICustomDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for CustomDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ICustomDevice>();
}
unsafe impl windows_core::Interface for CustomDevice {
type Vtable = <ICustomDevice as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ICustomDevice as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for CustomDevice {
const NAME: &'static str = "Windows.Devices.Custom.CustomDevice";
}
unsafe impl Send for CustomDevice {}
unsafe impl Sync for CustomDevice {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceAccessMode(pub i32);
impl DeviceAccessMode {
pub const Read: Self = Self(0i32);
pub const Write: Self = Self(1i32);
pub const ReadWrite: Self = Self(2i32);
}
impl windows_core::TypeKind for DeviceAccessMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DeviceAccessMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Custom.DeviceAccessMode;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceSharingMode(pub i32);
impl DeviceSharingMode {
pub const Shared: Self = Self(0i32);
pub const Exclusive: Self = Self(1i32);
}
impl windows_core::TypeKind for DeviceSharingMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DeviceSharingMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Custom.DeviceSharingMode;i4)");
}
windows_core::imp::define_interface!(ICustomDevice, ICustomDevice_Vtbl, 0xdd30251f_c48b_43bd_bcb1_dec88f15143e);
impl windows_core::RuntimeType for ICustomDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICustomDevice_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Streams")]
pub InputStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
InputStream: usize,
#[cfg(feature = "Storage_Streams")]
pub OutputStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
OutputStream: usize,
#[cfg(feature = "Storage_Streams")]
pub SendIOControlAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SendIOControlAsync: usize,
#[cfg(feature = "Storage_Streams")]
pub TrySendIOControlAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
TrySendIOControlAsync: usize,
}
windows_core::imp::define_interface!(ICustomDeviceStatics, ICustomDeviceStatics_Vtbl, 0xc8220312_ef4c_46b1_a58e_eeb308dc8917);
impl windows_core::RuntimeType for ICustomDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ICustomDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, DeviceAccessMode, DeviceSharingMode, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IIOControlCode, IIOControlCode_Vtbl, 0x0e9559e7_60c8_4375_a761_7f8808066c60);
impl windows_core::RuntimeType for IIOControlCode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IIOControlCode, windows_core::IUnknown, windows_core::IInspectable);
impl IIOControlCode {
pub fn AccessMode(&self) -> windows_core::Result<IOControlAccessMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccessMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn BufferingMethod(&self) -> windows_core::Result<IOControlBufferingMethod> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BufferingMethod)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Function(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Function)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn DeviceType(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ControlCode(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ControlCode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeName for IIOControlCode {
const NAME: &'static str = "Windows.Devices.Custom.IIOControlCode";
}
pub trait IIOControlCode_Impl: windows_core::IUnknownImpl {
fn AccessMode(&self) -> windows_core::Result<IOControlAccessMode>;
fn BufferingMethod(&self) -> windows_core::Result<IOControlBufferingMethod>;
fn Function(&self) -> windows_core::Result<u16>;
fn DeviceType(&self) -> windows_core::Result<u16>;
fn ControlCode(&self) -> windows_core::Result<u32>;
}
impl IIOControlCode_Vtbl {
pub const fn new<Identity: IIOControlCode_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AccessMode<Identity: IIOControlCode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut IOControlAccessMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIOControlCode_Impl::AccessMode(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BufferingMethod<Identity: IIOControlCode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut IOControlBufferingMethod) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIOControlCode_Impl::BufferingMethod(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Function<Identity: IIOControlCode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIOControlCode_Impl::Function(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DeviceType<Identity: IIOControlCode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIOControlCode_Impl::DeviceType(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ControlCode<Identity: IIOControlCode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIOControlCode_Impl::ControlCode(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIOControlCode, OFFSET>(),
AccessMode: AccessMode::<Identity, OFFSET>,
BufferingMethod: BufferingMethod::<Identity, OFFSET>,
Function: Function::<Identity, OFFSET>,
DeviceType: DeviceType::<Identity, OFFSET>,
ControlCode: ControlCode::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIOControlCode as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIOControlCode_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AccessMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut IOControlAccessMode) -> windows_core::HRESULT,
pub BufferingMethod: unsafe extern "system" fn(*mut core::ffi::c_void, *mut IOControlBufferingMethod) -> windows_core::HRESULT,
pub Function: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub DeviceType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub ControlCode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IIOControlCodeFactory, IIOControlCodeFactory_Vtbl, 0x856a7cf0_4c11_44ae_afc6_b8d4a212788f);
impl windows_core::RuntimeType for IIOControlCodeFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IIOControlCodeFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateIOControlCode: unsafe extern "system" fn(*mut core::ffi::c_void, u16, u16, IOControlAccessMode, IOControlBufferingMethod, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IKnownDeviceTypesStatics, IKnownDeviceTypesStatics_Vtbl, 0xee5479c2_5448_45da_ad1b_24948c239094);
impl windows_core::RuntimeType for IKnownDeviceTypesStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IKnownDeviceTypesStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Unknown: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct IOControlAccessMode(pub i32);
impl IOControlAccessMode {
pub const Any: Self = Self(0i32);
pub const Read: Self = Self(1i32);
pub const Write: Self = Self(2i32);
pub const ReadWrite: Self = Self(3i32);
}
impl windows_core::TypeKind for IOControlAccessMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for IOControlAccessMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Custom.IOControlAccessMode;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct IOControlBufferingMethod(pub i32);
impl IOControlBufferingMethod {
pub const Buffered: Self = Self(0i32);
pub const DirectInput: Self = Self(1i32);
pub const DirectOutput: Self = Self(2i32);
pub const Neither: Self = Self(3i32);
}
impl windows_core::TypeKind for IOControlBufferingMethod {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for IOControlBufferingMethod {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Custom.IOControlBufferingMethod;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IOControlCode(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(IOControlCode, windows_core::IUnknown, windows_core::IInspectable, IIOControlCode);
impl IOControlCode {
pub fn AccessMode(&self) -> windows_core::Result<IOControlAccessMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccessMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn BufferingMethod(&self) -> windows_core::Result<IOControlBufferingMethod> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BufferingMethod)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Function(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Function)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn DeviceType(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ControlCode(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ControlCode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CreateIOControlCode(devicetype: u16, function: u16, accessmode: IOControlAccessMode, bufferingmethod: IOControlBufferingMethod) -> windows_core::Result<IOControlCode> {
Self::IIOControlCodeFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateIOControlCode)(windows_core::Interface::as_raw(this), devicetype, function, accessmode, bufferingmethod, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IIOControlCodeFactory<R, F: FnOnce(&IIOControlCodeFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<IOControlCode, IIOControlCodeFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for IOControlCode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IIOControlCode>();
}
unsafe impl windows_core::Interface for IOControlCode {
type Vtable = <IIOControlCode as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIOControlCode as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IOControlCode {
const NAME: &'static str = "Windows.Devices.Custom.IOControlCode";
}
unsafe impl Send for IOControlCode {}
unsafe impl Sync for IOControlCode {}
pub struct KnownDeviceTypes;
impl KnownDeviceTypes {
pub fn Unknown() -> windows_core::Result<u16> {
Self::IKnownDeviceTypesStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Unknown)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
fn IKnownDeviceTypesStatics<R, F: FnOnce(&IKnownDeviceTypesStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<KnownDeviceTypes, IKnownDeviceTypesStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for KnownDeviceTypes {
const NAME: &'static str = "Windows.Devices.Custom.KnownDeviceTypes";
}
File diff suppressed because it is too large Load Diff
+309
View File
@@ -0,0 +1,309 @@
#[cfg(feature = "Devices_Display_Core")]
pub mod Core;
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DisplayMonitor(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(DisplayMonitor, windows_core::IUnknown, windows_core::IInspectable);
impl DisplayMonitor {
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ConnectionKind(&self) -> windows_core::Result<DisplayMonitorConnectionKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ConnectionKind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PhysicalConnector(&self) -> windows_core::Result<DisplayMonitorPhysicalConnectorKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhysicalConnector)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn DisplayAdapterDeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayAdapterDeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(feature = "Graphics")]
pub fn DisplayAdapterId(&self) -> windows_core::Result<super::super::Graphics::DisplayAdapterId> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayAdapterId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn DisplayAdapterTargetId(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DisplayAdapterTargetId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn UsageKind(&self) -> windows_core::Result<DisplayMonitorUsageKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UsageKind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Graphics")]
pub fn NativeResolutionInRawPixels(&self) -> windows_core::Result<super::super::Graphics::SizeInt32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NativeResolutionInRawPixels)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PhysicalSizeInInches(&self) -> windows_core::Result<super::super::Foundation::IReference<super::super::Foundation::Size>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhysicalSizeInInches)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RawDpiX(&self) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RawDpiX)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn RawDpiY(&self) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RawDpiY)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn RedPrimary(&self) -> windows_core::Result<super::super::Foundation::Point> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RedPrimary)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GreenPrimary(&self) -> windows_core::Result<super::super::Foundation::Point> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GreenPrimary)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn BluePrimary(&self) -> windows_core::Result<super::super::Foundation::Point> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BluePrimary)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn WhitePoint(&self) -> windows_core::Result<super::super::Foundation::Point> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WhitePoint)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MaxLuminanceInNits(&self) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxLuminanceInNits)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MinLuminanceInNits(&self) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinLuminanceInNits)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MaxAverageFullFrameLuminanceInNits(&self) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxAverageFullFrameLuminanceInNits)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetDescriptor(&self, descriptorkind: DisplayMonitorDescriptorKind) -> windows_core::Result<windows_core::Array<u8>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetDescriptor)(windows_core::Interface::as_raw(this), descriptorkind, windows_core::Array::<u8>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn IsDolbyVisionSupportedInHdrMode(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDisplayMonitor2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsDolbyVisionSupportedInHdrMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::IDisplayMonitorStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<DisplayMonitor>> {
Self::IDisplayMonitorStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn FromInterfaceIdAsync(deviceinterfaceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<DisplayMonitor>> {
Self::IDisplayMonitorStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromInterfaceIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceinterfaceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IDisplayMonitorStatics<R, F: FnOnce(&IDisplayMonitorStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<DisplayMonitor, IDisplayMonitorStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for DisplayMonitor {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IDisplayMonitor>();
}
unsafe impl windows_core::Interface for DisplayMonitor {
type Vtable = <IDisplayMonitor as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IDisplayMonitor as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for DisplayMonitor {
const NAME: &'static str = "Windows.Devices.Display.DisplayMonitor";
}
unsafe impl Send for DisplayMonitor {}
unsafe impl Sync for DisplayMonitor {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DisplayMonitorConnectionKind(pub i32);
impl DisplayMonitorConnectionKind {
pub const Internal: Self = Self(0i32);
pub const Wired: Self = Self(1i32);
pub const Wireless: Self = Self(2i32);
pub const Virtual: Self = Self(3i32);
}
impl windows_core::TypeKind for DisplayMonitorConnectionKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DisplayMonitorConnectionKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Display.DisplayMonitorConnectionKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DisplayMonitorDescriptorKind(pub i32);
impl DisplayMonitorDescriptorKind {
pub const Edid: Self = Self(0i32);
pub const DisplayId: Self = Self(1i32);
}
impl windows_core::TypeKind for DisplayMonitorDescriptorKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DisplayMonitorDescriptorKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Display.DisplayMonitorDescriptorKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DisplayMonitorPhysicalConnectorKind(pub i32);
impl DisplayMonitorPhysicalConnectorKind {
pub const Unknown: Self = Self(0i32);
pub const HD15: Self = Self(1i32);
pub const AnalogTV: Self = Self(2i32);
pub const Dvi: Self = Self(3i32);
pub const Hdmi: Self = Self(4i32);
pub const Lvds: Self = Self(5i32);
pub const Sdi: Self = Self(6i32);
pub const DisplayPort: Self = Self(7i32);
}
impl windows_core::TypeKind for DisplayMonitorPhysicalConnectorKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DisplayMonitorPhysicalConnectorKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Display.DisplayMonitorPhysicalConnectorKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DisplayMonitorUsageKind(pub i32);
impl DisplayMonitorUsageKind {
pub const Standard: Self = Self(0i32);
pub const HeadMounted: Self = Self(1i32);
pub const SpecialPurpose: Self = Self(2i32);
}
impl windows_core::TypeKind for DisplayMonitorUsageKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DisplayMonitorUsageKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Display.DisplayMonitorUsageKind;i4)");
}
windows_core::imp::define_interface!(IDisplayMonitor, IDisplayMonitor_Vtbl, 0x1f6b15d4_1d01_4c51_87e2_6f954a772b59);
impl windows_core::RuntimeType for IDisplayMonitor {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IDisplayMonitor_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ConnectionKind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DisplayMonitorConnectionKind) -> windows_core::HRESULT,
pub PhysicalConnector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DisplayMonitorPhysicalConnectorKind) -> windows_core::HRESULT,
pub DisplayAdapterDeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Graphics")]
pub DisplayAdapterId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Graphics::DisplayAdapterId) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics"))]
DisplayAdapterId: usize,
pub DisplayAdapterTargetId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub UsageKind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DisplayMonitorUsageKind) -> windows_core::HRESULT,
#[cfg(feature = "Graphics")]
pub NativeResolutionInRawPixels: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Graphics::SizeInt32) -> windows_core::HRESULT,
#[cfg(not(feature = "Graphics"))]
NativeResolutionInRawPixels: usize,
pub PhysicalSizeInInches: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RawDpiX: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub RawDpiY: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub RedPrimary: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Point) -> windows_core::HRESULT,
pub GreenPrimary: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Point) -> windows_core::HRESULT,
pub BluePrimary: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Point) -> windows_core::HRESULT,
pub WhitePoint: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Point) -> windows_core::HRESULT,
pub MaxLuminanceInNits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub MinLuminanceInNits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub MaxAverageFullFrameLuminanceInNits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub GetDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, DisplayMonitorDescriptorKind, *mut u32, *mut *mut u8) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IDisplayMonitor2, IDisplayMonitor2_Vtbl, 0x023018e6_cb23_5830_96df_a7bf6e602577);
impl windows_core::RuntimeType for IDisplayMonitor2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IDisplayMonitor2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsDolbyVisionSupportedInHdrMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IDisplayMonitorStatics, IDisplayMonitorStatics_Vtbl, 0x6eae698f_a228_4c05_821d_b695d667de8e);
impl windows_core::RuntimeType for IDisplayMonitorStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IDisplayMonitorStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromInterfaceIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
@@ -0,0 +1,390 @@
windows_core::imp::define_interface!(IPnpObject, IPnpObject_Vtbl, 0x95c66258_733b_4a8f_93a3_db078ac870c1);
impl windows_core::RuntimeType for IPnpObject {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPnpObject_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Type: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PnpObjectType) -> windows_core::HRESULT,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Properties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Update: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPnpObjectStatics, IPnpObjectStatics_Vtbl, 0xb3c32a3d_d168_4660_bbf3_a733b14b6e01);
impl windows_core::RuntimeType for IPnpObjectStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPnpObjectStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateFromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, PnpObjectType, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FindAllAsync: unsafe extern "system" fn(*mut core::ffi::c_void, PnpObjectType, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FindAllAsyncAqsFilter: unsafe extern "system" fn(*mut core::ffi::c_void, PnpObjectType, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateWatcher: unsafe extern "system" fn(*mut core::ffi::c_void, PnpObjectType, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateWatcherAqsFilter: unsafe extern "system" fn(*mut core::ffi::c_void, PnpObjectType, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPnpObjectUpdate, IPnpObjectUpdate_Vtbl, 0x6f59e812_001e_4844_bcc6_432886856a17);
impl windows_core::RuntimeType for IPnpObjectUpdate {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPnpObjectUpdate_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Type: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PnpObjectType) -> windows_core::HRESULT,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Properties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPnpObjectWatcher, IPnpObjectWatcher_Vtbl, 0x83c95ca8_4772_4a7a_aca8_e48c42a89c44);
impl windows_core::RuntimeType for IPnpObjectWatcher {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPnpObjectWatcher_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Added: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveAdded: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Updated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Removed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveRemoved: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub EnumerationCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveEnumerationCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Stopped: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveStopped: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::DeviceWatcherStatus) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PnpObject(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PnpObject, windows_core::IUnknown, windows_core::IInspectable);
impl PnpObject {
pub fn Type(&self) -> windows_core::Result<PnpObjectType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Type)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Properties(&self) -> windows_core::Result<windows_collections::IMapView<windows_core::HSTRING, windows_core::IInspectable>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Properties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Update<P0>(&self, updateinfo: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<PnpObjectUpdate>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).Update)(windows_core::Interface::as_raw(this), updateinfo.param().abi()).ok() }
}
pub fn CreateFromIdAsync<P2>(r#type: PnpObjectType, id: &windows_core::HSTRING, requestedproperties: P2) -> windows_core::Result<windows_future::IAsyncOperation<PnpObject>>
where
P2: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
Self::IPnpObjectStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateFromIdAsync)(windows_core::Interface::as_raw(this), r#type, core::mem::transmute_copy(id), requestedproperties.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn FindAllAsync<P1>(r#type: PnpObjectType, requestedproperties: P1) -> windows_core::Result<windows_future::IAsyncOperation<PnpObjectCollection>>
where
P1: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
Self::IPnpObjectStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAllAsync)(windows_core::Interface::as_raw(this), r#type, requestedproperties.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn FindAllAsyncAqsFilter<P1>(r#type: PnpObjectType, requestedproperties: P1, aqsfilter: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<PnpObjectCollection>>
where
P1: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
Self::IPnpObjectStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAllAsyncAqsFilter)(windows_core::Interface::as_raw(this), r#type, requestedproperties.param().abi(), core::mem::transmute_copy(aqsfilter), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateWatcher<P1>(r#type: PnpObjectType, requestedproperties: P1) -> windows_core::Result<PnpObjectWatcher>
where
P1: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
Self::IPnpObjectStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWatcher)(windows_core::Interface::as_raw(this), r#type, requestedproperties.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateWatcherAqsFilter<P1>(r#type: PnpObjectType, requestedproperties: P1, aqsfilter: &windows_core::HSTRING) -> windows_core::Result<PnpObjectWatcher>
where
P1: windows_core::Param<windows_collections::IIterable<windows_core::HSTRING>>,
{
Self::IPnpObjectStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWatcherAqsFilter)(windows_core::Interface::as_raw(this), r#type, requestedproperties.param().abi(), core::mem::transmute_copy(aqsfilter), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPnpObjectStatics<R, F: FnOnce(&IPnpObjectStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PnpObject, IPnpObjectStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PnpObject {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPnpObject>();
}
unsafe impl windows_core::Interface for PnpObject {
type Vtable = <IPnpObject as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPnpObject as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PnpObject {
const NAME: &'static str = "Windows.Devices.Enumeration.Pnp.PnpObject";
}
unsafe impl Send for PnpObject {}
unsafe impl Sync for PnpObject {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PnpObjectCollection(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PnpObjectCollection, windows_core::IUnknown, windows_core::IInspectable, windows_collections::IVectorView<PnpObject>);
windows_core::imp::required_hierarchy!(PnpObjectCollection, windows_collections::IIterable<PnpObject>);
impl PnpObjectCollection {
pub fn First(&self) -> windows_core::Result<windows_collections::IIterator<PnpObject>> {
let this = &windows_core::Interface::cast::<windows_collections::IIterable<PnpObject>>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).First)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetAt(&self, index: u32) -> windows_core::Result<PnpObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetAt)(windows_core::Interface::as_raw(this), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Size(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Size)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IndexOf<P0>(&self, value: P0, index: &mut u32) -> windows_core::Result<bool>
where
P0: windows_core::Param<PnpObject>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IndexOf)(windows_core::Interface::as_raw(this), value.param().abi(), index, &mut result__).map(|| result__)
}
}
pub fn GetMany(&self, startindex: u32, items: &mut [Option<PnpObject>]) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetMany)(windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), core::mem::transmute_copy(&items), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PnpObjectCollection {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, windows_collections::IVectorView<PnpObject>>();
}
unsafe impl windows_core::Interface for PnpObjectCollection {
type Vtable = <windows_collections::IVectorView<PnpObject> as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <windows_collections::IVectorView<PnpObject> as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PnpObjectCollection {
const NAME: &'static str = "Windows.Devices.Enumeration.Pnp.PnpObjectCollection";
}
unsafe impl Send for PnpObjectCollection {}
unsafe impl Sync for PnpObjectCollection {}
impl IntoIterator for PnpObjectCollection {
type Item = PnpObject;
type IntoIter = windows_collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
IntoIterator::into_iter(&self)
}
}
impl IntoIterator for &PnpObjectCollection {
type Item = PnpObject;
type IntoIter = windows_collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
self.First().unwrap()
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PnpObjectType(pub i32);
impl PnpObjectType {
pub const Unknown: Self = Self(0i32);
pub const DeviceInterface: Self = Self(1i32);
pub const DeviceContainer: Self = Self(2i32);
pub const Device: Self = Self(3i32);
pub const DeviceInterfaceClass: Self = Self(4i32);
pub const AssociationEndpoint: Self = Self(5i32);
pub const AssociationEndpointContainer: Self = Self(6i32);
pub const AssociationEndpointService: Self = Self(7i32);
pub const DevicePanel: Self = Self(8i32);
pub const AssociationEndpointProtocol: Self = Self(9i32);
}
impl windows_core::TypeKind for PnpObjectType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PnpObjectType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Enumeration.Pnp.PnpObjectType;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PnpObjectUpdate(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PnpObjectUpdate, windows_core::IUnknown, windows_core::IInspectable);
impl PnpObjectUpdate {
pub fn Type(&self) -> windows_core::Result<PnpObjectType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Type)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Properties(&self) -> windows_core::Result<windows_collections::IMapView<windows_core::HSTRING, windows_core::IInspectable>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Properties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PnpObjectUpdate {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPnpObjectUpdate>();
}
unsafe impl windows_core::Interface for PnpObjectUpdate {
type Vtable = <IPnpObjectUpdate as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPnpObjectUpdate as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PnpObjectUpdate {
const NAME: &'static str = "Windows.Devices.Enumeration.Pnp.PnpObjectUpdate";
}
unsafe impl Send for PnpObjectUpdate {}
unsafe impl Sync for PnpObjectUpdate {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PnpObjectWatcher(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PnpObjectWatcher, windows_core::IUnknown, windows_core::IInspectable);
impl PnpObjectWatcher {
pub fn Added<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<PnpObjectWatcher, PnpObject>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Added)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveAdded(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveAdded)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Updated<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Updated)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveUpdated(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveUpdated)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Removed<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<PnpObjectWatcher, PnpObjectUpdate>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Removed)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveRemoved(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveRemoved)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn EnumerationCompleted<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<PnpObjectWatcher, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EnumerationCompleted)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveEnumerationCompleted(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveEnumerationCompleted)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Stopped<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<PnpObjectWatcher, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Stopped)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveStopped(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveStopped)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Status(&self) -> windows_core::Result<super::DeviceWatcherStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Stop(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Stop)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for PnpObjectWatcher {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPnpObjectWatcher>();
}
unsafe impl windows_core::Interface for PnpObjectWatcher {
type Vtable = <IPnpObjectWatcher as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPnpObjectWatcher as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PnpObjectWatcher {
const NAME: &'static str = "Windows.Devices.Enumeration.Pnp.PnpObjectWatcher";
}
unsafe impl Send for PnpObjectWatcher {}
unsafe impl Sync for PnpObjectWatcher {}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,432 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Geofence(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(Geofence, windows_core::IUnknown, windows_core::IInspectable);
impl Geofence {
pub fn StartTime(&self) -> windows_core::Result<super::super::super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartTime)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Duration(&self) -> windows_core::Result<super::super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Duration)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn DwellTime(&self) -> windows_core::Result<super::super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DwellTime)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn MonitoredStates(&self) -> windows_core::Result<MonitoredGeofenceStates> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MonitoredStates)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Geoshape(&self) -> windows_core::Result<super::IGeoshape> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Geoshape)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SingleUse(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SingleUse)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Create<P1>(id: &windows_core::HSTRING, geoshape: P1) -> windows_core::Result<Geofence>
where
P1: windows_core::Param<super::IGeoshape>,
{
Self::IGeofenceFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Create)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), geoshape.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateWithMonitorStates<P1>(id: &windows_core::HSTRING, geoshape: P1, monitoredstates: MonitoredGeofenceStates, singleuse: bool) -> windows_core::Result<Geofence>
where
P1: windows_core::Param<super::IGeoshape>,
{
Self::IGeofenceFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWithMonitorStates)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), geoshape.param().abi(), monitoredstates, singleuse, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateWithMonitorStatesAndDwellTime<P1>(id: &windows_core::HSTRING, geoshape: P1, monitoredstates: MonitoredGeofenceStates, singleuse: bool, dwelltime: super::super::super::Foundation::TimeSpan) -> windows_core::Result<Geofence>
where
P1: windows_core::Param<super::IGeoshape>,
{
Self::IGeofenceFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWithMonitorStatesAndDwellTime)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), geoshape.param().abi(), monitoredstates, singleuse, dwelltime, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateWithMonitorStatesDwellTimeStartTimeAndDuration<P1>(id: &windows_core::HSTRING, geoshape: P1, monitoredstates: MonitoredGeofenceStates, singleuse: bool, dwelltime: super::super::super::Foundation::TimeSpan, starttime: super::super::super::Foundation::DateTime, duration: super::super::super::Foundation::TimeSpan) -> windows_core::Result<Geofence>
where
P1: windows_core::Param<super::IGeoshape>,
{
Self::IGeofenceFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWithMonitorStatesDwellTimeStartTimeAndDuration)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(id), geoshape.param().abi(), monitoredstates, singleuse, dwelltime, starttime, duration, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGeofenceFactory<R, F: FnOnce(&IGeofenceFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<Geofence, IGeofenceFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for Geofence {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGeofence>();
}
unsafe impl windows_core::Interface for Geofence {
type Vtable = <IGeofence as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGeofence as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Geofence {
const NAME: &'static str = "Windows.Devices.Geolocation.Geofencing.Geofence";
}
unsafe impl Send for Geofence {}
unsafe impl Sync for Geofence {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GeofenceMonitor(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GeofenceMonitor, windows_core::IUnknown, windows_core::IInspectable);
impl GeofenceMonitor {
pub fn Status(&self) -> windows_core::Result<GeofenceMonitorStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Geofences(&self) -> windows_core::Result<windows_collections::IVector<Geofence>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Geofences)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn LastKnownGeoposition(&self) -> windows_core::Result<super::Geoposition> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LastKnownGeoposition)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GeofenceStateChanged<P0>(&self, eventhandler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GeofenceMonitor, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GeofenceStateChanged)(windows_core::Interface::as_raw(this), eventhandler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveGeofenceStateChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveGeofenceStateChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn ReadReports(&self) -> windows_core::Result<windows_collections::IVectorView<GeofenceStateChangeReport>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReadReports)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StatusChanged<P0>(&self, eventhandler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GeofenceMonitor, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StatusChanged)(windows_core::Interface::as_raw(this), eventhandler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveStatusChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveStatusChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Current() -> windows_core::Result<GeofenceMonitor> {
Self::IGeofenceMonitorStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Current)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGeofenceMonitorStatics<R, F: FnOnce(&IGeofenceMonitorStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GeofenceMonitor, IGeofenceMonitorStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for GeofenceMonitor {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGeofenceMonitor>();
}
unsafe impl windows_core::Interface for GeofenceMonitor {
type Vtable = <IGeofenceMonitor as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGeofenceMonitor as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GeofenceMonitor {
const NAME: &'static str = "Windows.Devices.Geolocation.Geofencing.GeofenceMonitor";
}
unsafe impl Send for GeofenceMonitor {}
unsafe impl Sync for GeofenceMonitor {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GeofenceMonitorStatus(pub i32);
impl GeofenceMonitorStatus {
pub const Ready: Self = Self(0i32);
pub const Initializing: Self = Self(1i32);
pub const NoData: Self = Self(2i32);
pub const Disabled: Self = Self(3i32);
pub const NotInitialized: Self = Self(4i32);
pub const NotAvailable: Self = Self(5i32);
}
impl windows_core::TypeKind for GeofenceMonitorStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GeofenceMonitorStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Geolocation.Geofencing.GeofenceMonitorStatus;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GeofenceRemovalReason(pub i32);
impl GeofenceRemovalReason {
pub const Used: Self = Self(0i32);
pub const Expired: Self = Self(1i32);
}
impl windows_core::TypeKind for GeofenceRemovalReason {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GeofenceRemovalReason {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Geolocation.Geofencing.GeofenceRemovalReason;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GeofenceState(pub u32);
impl GeofenceState {
pub const None: Self = Self(0u32);
pub const Entered: Self = Self(1u32);
pub const Exited: Self = Self(2u32);
pub const Removed: Self = Self(4u32);
}
impl windows_core::TypeKind for GeofenceState {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GeofenceState {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Geolocation.Geofencing.GeofenceState;u4)");
}
impl GeofenceState {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for GeofenceState {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for GeofenceState {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for GeofenceState {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for GeofenceState {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for GeofenceState {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GeofenceStateChangeReport(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GeofenceStateChangeReport, windows_core::IUnknown, windows_core::IInspectable);
impl GeofenceStateChangeReport {
pub fn NewState(&self) -> windows_core::Result<GeofenceState> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NewState)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Geofence(&self) -> windows_core::Result<Geofence> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Geofence)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Geoposition(&self) -> windows_core::Result<super::Geoposition> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Geoposition)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RemovalReason(&self) -> windows_core::Result<GeofenceRemovalReason> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RemovalReason)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for GeofenceStateChangeReport {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGeofenceStateChangeReport>();
}
unsafe impl windows_core::Interface for GeofenceStateChangeReport {
type Vtable = <IGeofenceStateChangeReport as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGeofenceStateChangeReport as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GeofenceStateChangeReport {
const NAME: &'static str = "Windows.Devices.Geolocation.Geofencing.GeofenceStateChangeReport";
}
unsafe impl Send for GeofenceStateChangeReport {}
unsafe impl Sync for GeofenceStateChangeReport {}
windows_core::imp::define_interface!(IGeofence, IGeofence_Vtbl, 0x9c090823_edb8_47e0_8245_5bf61d321f2d);
impl windows_core::RuntimeType for IGeofence {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGeofence_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub StartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::DateTime) -> windows_core::HRESULT,
pub Duration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub DwellTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub MonitoredStates: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MonitoredGeofenceStates) -> windows_core::HRESULT,
pub Geoshape: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SingleUse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGeofenceFactory, IGeofenceFactory_Vtbl, 0x841f624b_325f_4b90_bca7_2b8022a93796);
impl windows_core::RuntimeType for IGeofenceFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGeofenceFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Create: 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,
pub CreateWithMonitorStates: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, MonitoredGeofenceStates, bool, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateWithMonitorStatesAndDwellTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, MonitoredGeofenceStates, bool, super::super::super::Foundation::TimeSpan, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateWithMonitorStatesDwellTimeStartTimeAndDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, MonitoredGeofenceStates, bool, super::super::super::Foundation::TimeSpan, super::super::super::Foundation::DateTime, super::super::super::Foundation::TimeSpan, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGeofenceMonitor, IGeofenceMonitor_Vtbl, 0x4c0f5f78_1c1f_4621_bbbd_833b92247226);
impl windows_core::RuntimeType for IGeofenceMonitor {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGeofenceMonitor_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GeofenceMonitorStatus) -> windows_core::HRESULT,
pub Geofences: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub LastKnownGeoposition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GeofenceStateChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveGeofenceStateChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub ReadReports: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub StatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveStatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGeofenceMonitorStatics, IGeofenceMonitorStatics_Vtbl, 0x2dd32fcf_7e75_4899_ace3_2bd0a65cce06);
impl windows_core::RuntimeType for IGeofenceMonitorStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGeofenceMonitorStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Current: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGeofenceStateChangeReport, IGeofenceStateChangeReport_Vtbl, 0x9a243c18_2464_4c89_be05_b3ffff5babc5);
impl windows_core::RuntimeType for IGeofenceStateChangeReport {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGeofenceStateChangeReport_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub NewState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GeofenceState) -> windows_core::HRESULT,
pub Geofence: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Geoposition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemovalReason: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GeofenceRemovalReason) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MonitoredGeofenceStates(pub u32);
impl MonitoredGeofenceStates {
pub const None: Self = Self(0u32);
pub const Entered: Self = Self(1u32);
pub const Exited: Self = Self(2u32);
pub const Removed: Self = Self(4u32);
}
impl windows_core::TypeKind for MonitoredGeofenceStates {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for MonitoredGeofenceStates {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Geolocation.Geofencing.MonitoredGeofenceStates;u4)");
}
impl MonitoredGeofenceStates {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for MonitoredGeofenceStates {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for MonitoredGeofenceStates {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for MonitoredGeofenceStates {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for MonitoredGeofenceStates {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for MonitoredGeofenceStates {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
@@ -0,0 +1,86 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GeolocationProvider(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GeolocationProvider, windows_core::IUnknown, windows_core::IInspectable);
impl GeolocationProvider {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GeolocationProvider, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn IsOverridden(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsOverridden)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetOverridePosition(&self, newposition: super::BasicGeoposition, positionsource: super::PositionSource, accuracyinmeters: f64) -> windows_core::Result<LocationOverrideStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SetOverridePosition)(windows_core::Interface::as_raw(this), newposition, positionsource, accuracyinmeters, &mut result__).map(|| result__)
}
}
pub fn ClearOverridePosition(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ClearOverridePosition)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn IsOverriddenChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::EventHandler<windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsOverriddenChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveIsOverriddenChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveIsOverriddenChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
}
impl windows_core::RuntimeType for GeolocationProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGeolocationProvider>();
}
unsafe impl windows_core::Interface for GeolocationProvider {
type Vtable = <IGeolocationProvider as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGeolocationProvider as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GeolocationProvider {
const NAME: &'static str = "Windows.Devices.Geolocation.Provider.GeolocationProvider";
}
unsafe impl Send for GeolocationProvider {}
unsafe impl Sync for GeolocationProvider {}
windows_core::imp::define_interface!(IGeolocationProvider, IGeolocationProvider_Vtbl, 0xe4cf071d_3f64_509f_8dc2_0b74a059829d);
impl windows_core::RuntimeType for IGeolocationProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGeolocationProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsOverridden: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetOverridePosition: unsafe extern "system" fn(*mut core::ffi::c_void, super::BasicGeoposition, super::PositionSource, f64, *mut LocationOverrideStatus) -> windows_core::HRESULT,
pub ClearOverridePosition: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsOverriddenChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveIsOverriddenChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct LocationOverrideStatus(pub i32);
impl LocationOverrideStatus {
pub const Success: Self = Self(0i32);
pub const AccessDenied: Self = Self(1i32);
pub const AlreadyStarted: Self = Self(2i32);
pub const Other: Self = Self(3i32);
}
impl windows_core::TypeKind for LocationOverrideStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for LocationOverrideStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Geolocation.Provider.LocationOverrideStatus;i4)");
}
File diff suppressed because it is too large Load Diff
+468
View File
@@ -0,0 +1,468 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GpioPinProviderValueChangedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GpioPinProviderValueChangedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GpioPinProviderValueChangedEventArgs {
pub fn Edge(&self) -> windows_core::Result<ProviderGpioPinEdge> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Edge)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Create(edge: ProviderGpioPinEdge) -> windows_core::Result<GpioPinProviderValueChangedEventArgs> {
Self::IGpioPinProviderValueChangedEventArgsFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Create)(windows_core::Interface::as_raw(this), edge, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGpioPinProviderValueChangedEventArgsFactory<R, F: FnOnce(&IGpioPinProviderValueChangedEventArgsFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GpioPinProviderValueChangedEventArgs, IGpioPinProviderValueChangedEventArgsFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for GpioPinProviderValueChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGpioPinProviderValueChangedEventArgs>();
}
unsafe impl windows_core::Interface for GpioPinProviderValueChangedEventArgs {
type Vtable = <IGpioPinProviderValueChangedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGpioPinProviderValueChangedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GpioPinProviderValueChangedEventArgs {
const NAME: &'static str = "Windows.Devices.Gpio.Provider.GpioPinProviderValueChangedEventArgs";
}
unsafe impl Send for GpioPinProviderValueChangedEventArgs {}
unsafe impl Sync for GpioPinProviderValueChangedEventArgs {}
windows_core::imp::define_interface!(IGpioControllerProvider, IGpioControllerProvider_Vtbl, 0xad11cec7_19ea_4b21_874f_b91aed4a25db);
impl windows_core::RuntimeType for IGpioControllerProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IGpioControllerProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IGpioControllerProvider {
pub fn PinCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PinCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn OpenPinProvider(&self, pin: i32, sharingmode: ProviderGpioSharingMode) -> windows_core::Result<IGpioPinProvider> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenPinProvider)(windows_core::Interface::as_raw(this), pin, sharingmode, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IGpioControllerProvider {
const NAME: &'static str = "Windows.Devices.Gpio.Provider.IGpioControllerProvider";
}
pub trait IGpioControllerProvider_Impl: windows_core::IUnknownImpl {
fn PinCount(&self) -> windows_core::Result<i32>;
fn OpenPinProvider(&self, pin: i32, sharingMode: ProviderGpioSharingMode) -> windows_core::Result<IGpioPinProvider>;
}
impl IGpioControllerProvider_Vtbl {
pub const fn new<Identity: IGpioControllerProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn PinCount<Identity: IGpioControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioControllerProvider_Impl::PinCount(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn OpenPinProvider<Identity: IGpioControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pin: i32, sharingmode: ProviderGpioSharingMode, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioControllerProvider_Impl::OpenPinProvider(this, pin, sharingmode) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IGpioControllerProvider, OFFSET>(),
PinCount: PinCount::<Identity, OFFSET>,
OpenPinProvider: OpenPinProvider::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IGpioControllerProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioControllerProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PinCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub OpenPinProvider: unsafe extern "system" fn(*mut core::ffi::c_void, i32, ProviderGpioSharingMode, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioPinProvider, IGpioPinProvider_Vtbl, 0x42344cb7_6abc_40ff_9ce7_73b85301b900);
impl windows_core::RuntimeType for IGpioPinProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IGpioPinProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IGpioPinProvider {
pub fn ValueChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<IGpioPinProvider, GpioPinProviderValueChangedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveValueChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveValueChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn DebounceTimeout(&self) -> windows_core::Result<super::super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DebounceTimeout)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDebounceTimeout(&self, value: super::super::super::Foundation::TimeSpan) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDebounceTimeout)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn PinNumber(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PinNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SharingMode(&self) -> windows_core::Result<ProviderGpioSharingMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SharingMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsDriveModeSupported(&self, drivemode: ProviderGpioPinDriveMode) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsDriveModeSupported)(windows_core::Interface::as_raw(this), drivemode, &mut result__).map(|| result__)
}
}
pub fn GetDriveMode(&self) -> windows_core::Result<ProviderGpioPinDriveMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDriveMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDriveMode(&self, value: ProviderGpioPinDriveMode) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDriveMode)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Write(&self, value: ProviderGpioPinValue) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Write)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Read(&self) -> windows_core::Result<ProviderGpioPinValue> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Read)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeName for IGpioPinProvider {
const NAME: &'static str = "Windows.Devices.Gpio.Provider.IGpioPinProvider";
}
pub trait IGpioPinProvider_Impl: windows_core::IUnknownImpl {
fn ValueChanged(&self, handler: windows_core::Ref<super::super::super::Foundation::TypedEventHandler<IGpioPinProvider, GpioPinProviderValueChangedEventArgs>>) -> windows_core::Result<i64>;
fn RemoveValueChanged(&self, token: i64) -> windows_core::Result<()>;
fn DebounceTimeout(&self) -> windows_core::Result<super::super::super::Foundation::TimeSpan>;
fn SetDebounceTimeout(&self, value: &super::super::super::Foundation::TimeSpan) -> windows_core::Result<()>;
fn PinNumber(&self) -> windows_core::Result<i32>;
fn SharingMode(&self) -> windows_core::Result<ProviderGpioSharingMode>;
fn IsDriveModeSupported(&self, driveMode: ProviderGpioPinDriveMode) -> windows_core::Result<bool>;
fn GetDriveMode(&self) -> windows_core::Result<ProviderGpioPinDriveMode>;
fn SetDriveMode(&self, value: ProviderGpioPinDriveMode) -> windows_core::Result<()>;
fn Write(&self, value: ProviderGpioPinValue) -> windows_core::Result<()>;
fn Read(&self) -> windows_core::Result<ProviderGpioPinValue>;
}
impl IGpioPinProvider_Vtbl {
pub const fn new<Identity: IGpioPinProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ValueChanged<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioPinProvider_Impl::ValueChanged(this, core::mem::transmute_copy(&handler)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveValueChanged<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, token: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IGpioPinProvider_Impl::RemoveValueChanged(this, token).into()
}
}
unsafe extern "system" fn DebounceTimeout<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut super::super::super::Foundation::TimeSpan) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioPinProvider_Impl::DebounceTimeout(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetDebounceTimeout<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: super::super::super::Foundation::TimeSpan) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IGpioPinProvider_Impl::SetDebounceTimeout(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn PinNumber<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioPinProvider_Impl::PinNumber(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SharingMode<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut ProviderGpioSharingMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioPinProvider_Impl::SharingMode(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsDriveModeSupported<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, drivemode: ProviderGpioPinDriveMode, result__: *mut bool) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioPinProvider_Impl::IsDriveModeSupported(this, drivemode) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDriveMode<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut ProviderGpioPinDriveMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioPinProvider_Impl::GetDriveMode(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetDriveMode<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: ProviderGpioPinDriveMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IGpioPinProvider_Impl::SetDriveMode(this, value).into()
}
}
unsafe extern "system" fn Write<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: ProviderGpioPinValue) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IGpioPinProvider_Impl::Write(this, value).into()
}
}
unsafe extern "system" fn Read<Identity: IGpioPinProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut ProviderGpioPinValue) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioPinProvider_Impl::Read(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IGpioPinProvider, OFFSET>(),
ValueChanged: ValueChanged::<Identity, OFFSET>,
RemoveValueChanged: RemoveValueChanged::<Identity, OFFSET>,
DebounceTimeout: DebounceTimeout::<Identity, OFFSET>,
SetDebounceTimeout: SetDebounceTimeout::<Identity, OFFSET>,
PinNumber: PinNumber::<Identity, OFFSET>,
SharingMode: SharingMode::<Identity, OFFSET>,
IsDriveModeSupported: IsDriveModeSupported::<Identity, OFFSET>,
GetDriveMode: GetDriveMode::<Identity, OFFSET>,
SetDriveMode: SetDriveMode::<Identity, OFFSET>,
Write: Write::<Identity, OFFSET>,
Read: Read::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IGpioPinProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioPinProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub DebounceTimeout: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub SetDebounceTimeout: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub PinNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SharingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ProviderGpioSharingMode) -> windows_core::HRESULT,
pub IsDriveModeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderGpioPinDriveMode, *mut bool) -> windows_core::HRESULT,
pub GetDriveMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ProviderGpioPinDriveMode) -> windows_core::HRESULT,
pub SetDriveMode: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderGpioPinDriveMode) -> windows_core::HRESULT,
pub Write: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderGpioPinValue) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ProviderGpioPinValue) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioPinProviderValueChangedEventArgs, IGpioPinProviderValueChangedEventArgs_Vtbl, 0x32a6d6f2_3d5b_44cd_8fbe_13a69f2edb24);
impl windows_core::RuntimeType for IGpioPinProviderValueChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioPinProviderValueChangedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Edge: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ProviderGpioPinEdge) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioPinProviderValueChangedEventArgsFactory, IGpioPinProviderValueChangedEventArgsFactory_Vtbl, 0x3ecb0b59_568c_4392_b24a_8a59a902b1f1);
impl windows_core::RuntimeType for IGpioPinProviderValueChangedEventArgsFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioPinProviderValueChangedEventArgsFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderGpioPinEdge, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioProvider, IGpioProvider_Vtbl, 0x44e82707_08ca_434a_afe0_d61580446f7e);
impl windows_core::RuntimeType for IGpioProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IGpioProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IGpioProvider {
pub fn GetControllers(&self) -> windows_core::Result<windows_collections::IVectorView<IGpioControllerProvider>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllers)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IGpioProvider {
const NAME: &'static str = "Windows.Devices.Gpio.Provider.IGpioProvider";
}
pub trait IGpioProvider_Impl: windows_core::IUnknownImpl {
fn GetControllers(&self) -> windows_core::Result<windows_collections::IVectorView<IGpioControllerProvider>>;
}
impl IGpioProvider_Vtbl {
pub const fn new<Identity: IGpioProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetControllers<Identity: IGpioProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IGpioProvider_Impl::GetControllers(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IGpioProvider, OFFSET>(), GetControllers: GetControllers::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IGpioProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetControllers: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderGpioPinDriveMode(pub i32);
impl ProviderGpioPinDriveMode {
pub const Input: Self = Self(0i32);
pub const Output: Self = Self(1i32);
pub const InputPullUp: Self = Self(2i32);
pub const InputPullDown: Self = Self(3i32);
pub const OutputOpenDrain: Self = Self(4i32);
pub const OutputOpenDrainPullUp: Self = Self(5i32);
pub const OutputOpenSource: Self = Self(6i32);
pub const OutputOpenSourcePullDown: Self = Self(7i32);
}
impl windows_core::TypeKind for ProviderGpioPinDriveMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderGpioPinDriveMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.Provider.ProviderGpioPinDriveMode;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderGpioPinEdge(pub i32);
impl ProviderGpioPinEdge {
pub const FallingEdge: Self = Self(0i32);
pub const RisingEdge: Self = Self(1i32);
}
impl windows_core::TypeKind for ProviderGpioPinEdge {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderGpioPinEdge {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.Provider.ProviderGpioPinEdge;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderGpioPinValue(pub i32);
impl ProviderGpioPinValue {
pub const Low: Self = Self(0i32);
pub const High: Self = Self(1i32);
}
impl windows_core::TypeKind for ProviderGpioPinValue {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderGpioPinValue {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.Provider.ProviderGpioPinValue;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderGpioSharingMode(pub i32);
impl ProviderGpioSharingMode {
pub const Exclusive: Self = Self(0i32);
pub const SharedReadOnly: Self = Self(1i32);
}
impl windows_core::TypeKind for ProviderGpioSharingMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderGpioSharingMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.Provider.ProviderGpioSharingMode;i4)");
}
+640
View File
@@ -0,0 +1,640 @@
#[cfg(feature = "Devices_Gpio_Provider")]
pub mod Provider;
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct GpioChangeCount {
pub Count: u64,
pub RelativeTime: super::super::Foundation::TimeSpan,
}
impl windows_core::TypeKind for GpioChangeCount {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioChangeCount {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Devices.Gpio.GpioChangeCount;u8;struct(Windows.Foundation.TimeSpan;i8))");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GpioChangeCounter(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GpioChangeCounter, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(GpioChangeCounter, super::super::Foundation::IClosable);
impl GpioChangeCounter {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn SetPolarity(&self, value: GpioChangePolarity) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPolarity)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Polarity(&self) -> windows_core::Result<GpioChangePolarity> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Polarity)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsStarted(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsStarted)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Stop(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Stop)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Read(&self) -> windows_core::Result<GpioChangeCount> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Read)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Reset(&self) -> windows_core::Result<GpioChangeCount> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Reset)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Create<P0>(pin: P0) -> windows_core::Result<GpioChangeCounter>
where
P0: windows_core::Param<GpioPin>,
{
Self::IGpioChangeCounterFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Create)(windows_core::Interface::as_raw(this), pin.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGpioChangeCounterFactory<R, F: FnOnce(&IGpioChangeCounterFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GpioChangeCounter, IGpioChangeCounterFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for GpioChangeCounter {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGpioChangeCounter>();
}
unsafe impl windows_core::Interface for GpioChangeCounter {
type Vtable = <IGpioChangeCounter as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGpioChangeCounter as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GpioChangeCounter {
const NAME: &'static str = "Windows.Devices.Gpio.GpioChangeCounter";
}
unsafe impl Send for GpioChangeCounter {}
unsafe impl Sync for GpioChangeCounter {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GpioChangePolarity(pub i32);
impl GpioChangePolarity {
pub const Falling: Self = Self(0i32);
pub const Rising: Self = Self(1i32);
pub const Both: Self = Self(2i32);
}
impl windows_core::TypeKind for GpioChangePolarity {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioChangePolarity {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.GpioChangePolarity;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GpioChangeReader(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GpioChangeReader, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(GpioChangeReader, super::super::Foundation::IClosable);
impl GpioChangeReader {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Capacity(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Capacity)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Length(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Length)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsEmpty(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsEmpty)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsOverflowed(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsOverflowed)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetPolarity(&self, value: GpioChangePolarity) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPolarity)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Polarity(&self) -> windows_core::Result<GpioChangePolarity> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Polarity)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsStarted(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsStarted)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Stop(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Stop)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Clear(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Clear)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn GetNextItem(&self) -> windows_core::Result<GpioChangeRecord> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNextItem)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PeekNextItem(&self) -> windows_core::Result<GpioChangeRecord> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PeekNextItem)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetAllItems(&self) -> windows_core::Result<windows_collections::IVector<GpioChangeRecord>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetAllItems)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn WaitForItemsAsync(&self, count: i32) -> windows_core::Result<windows_future::IAsyncAction> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WaitForItemsAsync)(windows_core::Interface::as_raw(this), count, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Create<P0>(pin: P0) -> windows_core::Result<GpioChangeReader>
where
P0: windows_core::Param<GpioPin>,
{
Self::IGpioChangeReaderFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Create)(windows_core::Interface::as_raw(this), pin.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateWithCapacity<P0>(pin: P0, mincapacity: i32) -> windows_core::Result<GpioChangeReader>
where
P0: windows_core::Param<GpioPin>,
{
Self::IGpioChangeReaderFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWithCapacity)(windows_core::Interface::as_raw(this), pin.param().abi(), mincapacity, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGpioChangeReaderFactory<R, F: FnOnce(&IGpioChangeReaderFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GpioChangeReader, IGpioChangeReaderFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for GpioChangeReader {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGpioChangeReader>();
}
unsafe impl windows_core::Interface for GpioChangeReader {
type Vtable = <IGpioChangeReader as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGpioChangeReader as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GpioChangeReader {
const NAME: &'static str = "Windows.Devices.Gpio.GpioChangeReader";
}
unsafe impl Send for GpioChangeReader {}
unsafe impl Sync for GpioChangeReader {}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct GpioChangeRecord {
pub RelativeTime: super::super::Foundation::TimeSpan,
pub Edge: GpioPinEdge,
}
impl windows_core::TypeKind for GpioChangeRecord {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioChangeRecord {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Devices.Gpio.GpioChangeRecord;struct(Windows.Foundation.TimeSpan;i8);enum(Windows.Devices.Gpio.GpioPinEdge;i4))");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GpioController(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GpioController, windows_core::IUnknown, windows_core::IInspectable);
impl GpioController {
pub fn PinCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PinCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn OpenPin(&self, pinnumber: i32) -> windows_core::Result<GpioPin> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenPin)(windows_core::Interface::as_raw(this), pinnumber, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn OpenPinWithSharingMode(&self, pinnumber: i32, sharingmode: GpioSharingMode) -> windows_core::Result<GpioPin> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenPinWithSharingMode)(windows_core::Interface::as_raw(this), pinnumber, sharingmode, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn TryOpenPin(&self, pinnumber: i32, sharingmode: GpioSharingMode, pin: &mut Option<GpioPin>, openstatus: &mut GpioOpenStatus) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryOpenPin)(windows_core::Interface::as_raw(this), pinnumber, sharingmode, pin as *mut _ as _, openstatus, &mut result__).map(|| result__)
}
}
pub fn GetDefault() -> windows_core::Result<GpioController> {
Self::IGpioControllerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefault)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
#[cfg(feature = "Devices_Gpio_Provider")]
pub fn GetControllersAsync<P0>(provider: P0) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<GpioController>>>
where
P0: windows_core::Param<Provider::IGpioProvider>,
{
Self::IGpioControllerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllersAsync)(windows_core::Interface::as_raw(this), provider.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDefaultAsync() -> windows_core::Result<windows_future::IAsyncOperation<GpioController>> {
Self::IGpioControllerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefaultAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGpioControllerStatics<R, F: FnOnce(&IGpioControllerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GpioController, IGpioControllerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IGpioControllerStatics2<R, F: FnOnce(&IGpioControllerStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GpioController, IGpioControllerStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for GpioController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGpioController>();
}
unsafe impl windows_core::Interface for GpioController {
type Vtable = <IGpioController as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGpioController as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GpioController {
const NAME: &'static str = "Windows.Devices.Gpio.GpioController";
}
unsafe impl Send for GpioController {}
unsafe impl Sync for GpioController {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GpioOpenStatus(pub i32);
impl GpioOpenStatus {
pub const PinOpened: Self = Self(0i32);
pub const PinUnavailable: Self = Self(1i32);
pub const SharingViolation: Self = Self(2i32);
pub const MuxingConflict: Self = Self(3i32);
pub const UnknownError: Self = Self(4i32);
}
impl windows_core::TypeKind for GpioOpenStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioOpenStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.GpioOpenStatus;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GpioPin(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GpioPin, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(GpioPin, super::super::Foundation::IClosable);
impl GpioPin {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn ValueChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<GpioPin, GpioPinValueChangedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ValueChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveValueChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveValueChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn DebounceTimeout(&self) -> windows_core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DebounceTimeout)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDebounceTimeout(&self, value: super::super::Foundation::TimeSpan) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDebounceTimeout)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn PinNumber(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PinNumber)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SharingMode(&self) -> windows_core::Result<GpioSharingMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SharingMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsDriveModeSupported(&self, drivemode: GpioPinDriveMode) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsDriveModeSupported)(windows_core::Interface::as_raw(this), drivemode, &mut result__).map(|| result__)
}
}
pub fn GetDriveMode(&self) -> windows_core::Result<GpioPinDriveMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDriveMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDriveMode(&self, value: GpioPinDriveMode) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetDriveMode)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Write(&self, value: GpioPinValue) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Write)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Read(&self) -> windows_core::Result<GpioPinValue> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Read)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for GpioPin {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGpioPin>();
}
unsafe impl windows_core::Interface for GpioPin {
type Vtable = <IGpioPin as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGpioPin as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GpioPin {
const NAME: &'static str = "Windows.Devices.Gpio.GpioPin";
}
unsafe impl Send for GpioPin {}
unsafe impl Sync for GpioPin {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GpioPinDriveMode(pub i32);
impl GpioPinDriveMode {
pub const Input: Self = Self(0i32);
pub const Output: Self = Self(1i32);
pub const InputPullUp: Self = Self(2i32);
pub const InputPullDown: Self = Self(3i32);
pub const OutputOpenDrain: Self = Self(4i32);
pub const OutputOpenDrainPullUp: Self = Self(5i32);
pub const OutputOpenSource: Self = Self(6i32);
pub const OutputOpenSourcePullDown: Self = Self(7i32);
}
impl windows_core::TypeKind for GpioPinDriveMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioPinDriveMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.GpioPinDriveMode;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GpioPinEdge(pub i32);
impl GpioPinEdge {
pub const FallingEdge: Self = Self(0i32);
pub const RisingEdge: Self = Self(1i32);
}
impl windows_core::TypeKind for GpioPinEdge {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioPinEdge {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.GpioPinEdge;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GpioPinValue(pub i32);
impl GpioPinValue {
pub const Low: Self = Self(0i32);
pub const High: Self = Self(1i32);
}
impl windows_core::TypeKind for GpioPinValue {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioPinValue {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.GpioPinValue;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GpioPinValueChangedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GpioPinValueChangedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GpioPinValueChangedEventArgs {
pub fn Edge(&self) -> windows_core::Result<GpioPinEdge> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Edge)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for GpioPinValueChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGpioPinValueChangedEventArgs>();
}
unsafe impl windows_core::Interface for GpioPinValueChangedEventArgs {
type Vtable = <IGpioPinValueChangedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGpioPinValueChangedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GpioPinValueChangedEventArgs {
const NAME: &'static str = "Windows.Devices.Gpio.GpioPinValueChangedEventArgs";
}
unsafe impl Send for GpioPinValueChangedEventArgs {}
unsafe impl Sync for GpioPinValueChangedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GpioSharingMode(pub i32);
impl GpioSharingMode {
pub const Exclusive: Self = Self(0i32);
pub const SharedReadOnly: Self = Self(1i32);
}
impl windows_core::TypeKind for GpioSharingMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GpioSharingMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Gpio.GpioSharingMode;i4)");
}
windows_core::imp::define_interface!(IGpioChangeCounter, IGpioChangeCounter_Vtbl, 0xcb5ec0de_6801_43ff_803d_4576628a8b26);
impl windows_core::RuntimeType for IGpioChangeCounter {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioChangeCounter_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SetPolarity: unsafe extern "system" fn(*mut core::ffi::c_void, GpioChangePolarity) -> windows_core::HRESULT,
pub Polarity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioChangePolarity) -> windows_core::HRESULT,
pub IsStarted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioChangeCount) -> windows_core::HRESULT,
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioChangeCount) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioChangeCounterFactory, IGpioChangeCounterFactory_Vtbl, 0x147d94b6_0a9e_410c_b4fa_f89f4052084d);
impl windows_core::RuntimeType for IGpioChangeCounterFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioChangeCounterFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioChangeReader, IGpioChangeReader_Vtbl, 0x0abc885f_e031_48e8_8590_70de78363c6d);
impl windows_core::RuntimeType for IGpioChangeReader {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioChangeReader_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Capacity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub Length: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub IsEmpty: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsOverflowed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetPolarity: unsafe extern "system" fn(*mut core::ffi::c_void, GpioChangePolarity) -> windows_core::HRESULT,
pub Polarity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioChangePolarity) -> windows_core::HRESULT,
pub IsStarted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNextItem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioChangeRecord) -> windows_core::HRESULT,
pub PeekNextItem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioChangeRecord) -> windows_core::HRESULT,
pub GetAllItems: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub WaitForItemsAsync: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioChangeReaderFactory, IGpioChangeReaderFactory_Vtbl, 0xa9598ef3_390e_441a_9d1c_e8de0b2df0df);
impl windows_core::RuntimeType for IGpioChangeReaderFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioChangeReaderFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateWithCapacity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioController, IGpioController_Vtbl, 0x284012e3_7461_469c_a8bc_61d69d08a53c);
impl windows_core::RuntimeType for IGpioController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioController_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PinCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub OpenPin: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub OpenPinWithSharingMode: unsafe extern "system" fn(*mut core::ffi::c_void, i32, GpioSharingMode, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub TryOpenPin: unsafe extern "system" fn(*mut core::ffi::c_void, i32, GpioSharingMode, *mut *mut core::ffi::c_void, *mut GpioOpenStatus, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioControllerStatics, IGpioControllerStatics_Vtbl, 0x2ed6f42e_7af7_4116_9533_c43d99a1fb64);
impl windows_core::RuntimeType for IGpioControllerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioControllerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioControllerStatics2, IGpioControllerStatics2_Vtbl, 0x912b7d20_6ca4_4106_a373_fffd346b0e5b);
impl windows_core::RuntimeType for IGpioControllerStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioControllerStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Gpio_Provider")]
pub GetControllersAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Gpio_Provider"))]
GetControllersAsync: usize,
pub GetDefaultAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioPin, IGpioPin_Vtbl, 0x11d9b087_afae_4790_9ee9_e0eac942d201);
impl windows_core::RuntimeType for IGpioPin {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioPin_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub DebounceTimeout: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub SetDebounceTimeout: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub PinNumber: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SharingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioSharingMode) -> windows_core::HRESULT,
pub IsDriveModeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, GpioPinDriveMode, *mut bool) -> windows_core::HRESULT,
pub GetDriveMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioPinDriveMode) -> windows_core::HRESULT,
pub SetDriveMode: unsafe extern "system" fn(*mut core::ffi::c_void, GpioPinDriveMode) -> windows_core::HRESULT,
pub Write: unsafe extern "system" fn(*mut core::ffi::c_void, GpioPinValue) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioPinValue) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGpioPinValueChangedEventArgs, IGpioPinValueChangedEventArgs_Vtbl, 0x3137aae1_703d_4059_bd24_b5b25dffb84e);
impl windows_core::RuntimeType for IGpioPinValueChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGpioPinValueChangedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Edge: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GpioPinEdge) -> windows_core::HRESULT,
}
+398
View File
@@ -0,0 +1,398 @@
windows_core::imp::define_interface!(IKnownSimpleHapticsControllerWaveformsStatics, IKnownSimpleHapticsControllerWaveformsStatics_Vtbl, 0x3d577ef7_4cee_11e6_b535_001bdc06ab3b);
impl windows_core::RuntimeType for IKnownSimpleHapticsControllerWaveformsStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IKnownSimpleHapticsControllerWaveformsStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Click: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub BuzzContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub RumbleContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub Press: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub Release: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IKnownSimpleHapticsControllerWaveformsStatics2, IKnownSimpleHapticsControllerWaveformsStatics2_Vtbl, 0xa7d24c27_b79d_510a_bf79_ff6d49173e1d);
impl windows_core::RuntimeType for IKnownSimpleHapticsControllerWaveformsStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IKnownSimpleHapticsControllerWaveformsStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub BrushContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub ChiselMarkerContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub EraserContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub Error: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub GalaxyPenContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub Hover: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub InkContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub MarkerContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub PencilContinuous: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub Success: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ISimpleHapticsController, ISimpleHapticsController_Vtbl, 0x3d577ef9_4cee_11e6_b535_001bdc06ab3b);
impl windows_core::RuntimeType for ISimpleHapticsController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ISimpleHapticsController_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SupportedFeedback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsIntensitySupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsPlayCountSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsPlayDurationSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsReplayPauseIntervalSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub StopFeedback: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SendHapticFeedback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SendHapticFeedbackWithIntensity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub SendHapticFeedbackForDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, f64, super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub SendHapticFeedbackForPlayCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, f64, i32, super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ISimpleHapticsControllerFeedback, ISimpleHapticsControllerFeedback_Vtbl, 0x3d577ef8_4cee_11e6_b535_001bdc06ab3b);
impl windows_core::RuntimeType for ISimpleHapticsControllerFeedback {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ISimpleHapticsControllerFeedback_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Waveform: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub Duration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVibrationDevice, IVibrationDevice_Vtbl, 0x40f21a3e_8844_47ff_b312_06185a3844da);
impl windows_core::RuntimeType for IVibrationDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVibrationDevice_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SimpleHapticsController: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IVibrationDeviceStatics, IVibrationDeviceStatics_Vtbl, 0x53e2eded_2290_4ac9_8eb3_1a84122eb71c);
impl windows_core::RuntimeType for IVibrationDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IVibrationDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub RequestAccessAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDefaultAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FindAllAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub struct KnownSimpleHapticsControllerWaveforms;
impl KnownSimpleHapticsControllerWaveforms {
pub fn Click() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Click)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn BuzzContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BuzzContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn RumbleContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RumbleContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn Press() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Press)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn Release() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Release)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn BrushContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BrushContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn ChiselMarkerContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChiselMarkerContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn EraserContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EraserContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn Error() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn GalaxyPenContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GalaxyPenContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn Hover() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Hover)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn InkContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InkContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn MarkerContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MarkerContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn PencilContinuous() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PencilContinuous)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
pub fn Success() -> windows_core::Result<u16> {
Self::IKnownSimpleHapticsControllerWaveformsStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Success)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
})
}
fn IKnownSimpleHapticsControllerWaveformsStatics<R, F: FnOnce(&IKnownSimpleHapticsControllerWaveformsStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<KnownSimpleHapticsControllerWaveforms, IKnownSimpleHapticsControllerWaveformsStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IKnownSimpleHapticsControllerWaveformsStatics2<R, F: FnOnce(&IKnownSimpleHapticsControllerWaveformsStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<KnownSimpleHapticsControllerWaveforms, IKnownSimpleHapticsControllerWaveformsStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for KnownSimpleHapticsControllerWaveforms {
const NAME: &'static str = "Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SimpleHapticsController(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(SimpleHapticsController, windows_core::IUnknown, windows_core::IInspectable);
impl SimpleHapticsController {
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SupportedFeedback(&self) -> windows_core::Result<windows_collections::IVectorView<SimpleHapticsControllerFeedback>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SupportedFeedback)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IsIntensitySupported(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsIntensitySupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsPlayCountSupported(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsPlayCountSupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsPlayDurationSupported(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsPlayDurationSupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsReplayPauseIntervalSupported(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsReplayPauseIntervalSupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn StopFeedback(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).StopFeedback)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn SendHapticFeedback<P0>(&self, feedback: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<SimpleHapticsControllerFeedback>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SendHapticFeedback)(windows_core::Interface::as_raw(this), feedback.param().abi()).ok() }
}
pub fn SendHapticFeedbackWithIntensity<P0>(&self, feedback: P0, intensity: f64) -> windows_core::Result<()>
where
P0: windows_core::Param<SimpleHapticsControllerFeedback>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SendHapticFeedbackWithIntensity)(windows_core::Interface::as_raw(this), feedback.param().abi(), intensity).ok() }
}
pub fn SendHapticFeedbackForDuration<P0>(&self, feedback: P0, intensity: f64, playduration: super::super::Foundation::TimeSpan) -> windows_core::Result<()>
where
P0: windows_core::Param<SimpleHapticsControllerFeedback>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SendHapticFeedbackForDuration)(windows_core::Interface::as_raw(this), feedback.param().abi(), intensity, playduration).ok() }
}
pub fn SendHapticFeedbackForPlayCount<P0>(&self, feedback: P0, intensity: f64, playcount: i32, replaypauseinterval: super::super::Foundation::TimeSpan) -> windows_core::Result<()>
where
P0: windows_core::Param<SimpleHapticsControllerFeedback>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SendHapticFeedbackForPlayCount)(windows_core::Interface::as_raw(this), feedback.param().abi(), intensity, playcount, replaypauseinterval).ok() }
}
}
impl windows_core::RuntimeType for SimpleHapticsController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ISimpleHapticsController>();
}
unsafe impl windows_core::Interface for SimpleHapticsController {
type Vtable = <ISimpleHapticsController as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ISimpleHapticsController as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for SimpleHapticsController {
const NAME: &'static str = "Windows.Devices.Haptics.SimpleHapticsController";
}
unsafe impl Send for SimpleHapticsController {}
unsafe impl Sync for SimpleHapticsController {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SimpleHapticsControllerFeedback(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(SimpleHapticsControllerFeedback, windows_core::IUnknown, windows_core::IInspectable);
impl SimpleHapticsControllerFeedback {
pub fn Waveform(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Waveform)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Duration(&self) -> windows_core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Duration)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for SimpleHapticsControllerFeedback {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ISimpleHapticsControllerFeedback>();
}
unsafe impl windows_core::Interface for SimpleHapticsControllerFeedback {
type Vtable = <ISimpleHapticsControllerFeedback as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ISimpleHapticsControllerFeedback as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for SimpleHapticsControllerFeedback {
const NAME: &'static str = "Windows.Devices.Haptics.SimpleHapticsControllerFeedback";
}
unsafe impl Send for SimpleHapticsControllerFeedback {}
unsafe impl Sync for SimpleHapticsControllerFeedback {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct VibrationAccessStatus(pub i32);
impl VibrationAccessStatus {
pub const Allowed: Self = Self(0i32);
pub const DeniedByUser: Self = Self(1i32);
pub const DeniedBySystem: Self = Self(2i32);
pub const DeniedByEnergySaver: Self = Self(3i32);
}
impl windows_core::TypeKind for VibrationAccessStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for VibrationAccessStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Haptics.VibrationAccessStatus;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VibrationDevice(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(VibrationDevice, windows_core::IUnknown, windows_core::IInspectable);
impl VibrationDevice {
pub fn Id(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SimpleHapticsController(&self) -> windows_core::Result<SimpleHapticsController> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SimpleHapticsController)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestAccessAsync() -> windows_core::Result<windows_future::IAsyncOperation<VibrationAccessStatus>> {
Self::IVibrationDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestAccessAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::IVibrationDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<VibrationDevice>> {
Self::IVibrationDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDefaultAsync() -> windows_core::Result<windows_future::IAsyncOperation<VibrationDevice>> {
Self::IVibrationDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefaultAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn FindAllAsync() -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<VibrationDevice>>> {
Self::IVibrationDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAllAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IVibrationDeviceStatics<R, F: FnOnce(&IVibrationDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<VibrationDevice, IVibrationDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for VibrationDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IVibrationDevice>();
}
unsafe impl windows_core::Interface for VibrationDevice {
type Vtable = <IVibrationDevice as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IVibrationDevice as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for VibrationDevice {
const NAME: &'static str = "Windows.Devices.Haptics.VibrationDevice";
}
unsafe impl Send for VibrationDevice {}
unsafe impl Sync for VibrationDevice {}
File diff suppressed because it is too large Load Diff
+378
View File
@@ -0,0 +1,378 @@
windows_core::imp::define_interface!(II2cControllerProvider, II2cControllerProvider_Vtbl, 0x61c2bb82_4510_4163_a87c_4e15a9558980);
impl windows_core::RuntimeType for II2cControllerProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(II2cControllerProvider, windows_core::IUnknown, windows_core::IInspectable);
impl II2cControllerProvider {
pub fn GetDeviceProvider<P0>(&self, settings: P0) -> windows_core::Result<II2cDeviceProvider>
where
P0: windows_core::Param<ProviderI2cConnectionSettings>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceProvider)(windows_core::Interface::as_raw(this), settings.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for II2cControllerProvider {
const NAME: &'static str = "Windows.Devices.I2c.Provider.II2cControllerProvider";
}
pub trait II2cControllerProvider_Impl: windows_core::IUnknownImpl {
fn GetDeviceProvider(&self, settings: windows_core::Ref<ProviderI2cConnectionSettings>) -> windows_core::Result<II2cDeviceProvider>;
}
impl II2cControllerProvider_Vtbl {
pub const fn new<Identity: II2cControllerProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDeviceProvider<Identity: II2cControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, settings: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cControllerProvider_Impl::GetDeviceProvider(this, core::mem::transmute_copy(&settings)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, II2cControllerProvider, OFFSET>(),
GetDeviceProvider: GetDeviceProvider::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<II2cControllerProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cControllerProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceProvider: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(II2cDeviceProvider, II2cDeviceProvider_Vtbl, 0xad342654_57e8_453e_8329_d1e447d103a9);
impl windows_core::RuntimeType for II2cDeviceProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(II2cDeviceProvider, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(II2cDeviceProvider, super::super::super::Foundation::IClosable);
impl II2cDeviceProvider {
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn Write(&self, buffer: &[u8]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Write)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr()).ok() }
}
pub fn WritePartial(&self, buffer: &[u8]) -> windows_core::Result<ProviderI2cTransferResult> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WritePartial)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr(), &mut result__).map(|| result__)
}
}
pub fn Read(&self, buffer: &mut [u8]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Read)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr()).ok() }
}
pub fn ReadPartial(&self, buffer: &mut [u8]) -> windows_core::Result<ProviderI2cTransferResult> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReadPartial)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr(), &mut result__).map(|| result__)
}
}
pub fn WriteRead(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).WriteRead)(windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() }
}
pub fn WriteReadPartial(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> windows_core::Result<ProviderI2cTransferResult> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WriteReadPartial)(windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr(), &mut result__).map(|| result__)
}
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeName for II2cDeviceProvider {
const NAME: &'static str = "Windows.Devices.I2c.Provider.II2cDeviceProvider";
}
pub trait II2cDeviceProvider_Impl: super::super::super::Foundation::IClosable_Impl {
fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING>;
fn Write(&self, buffer: &[u8]) -> windows_core::Result<()>;
fn WritePartial(&self, buffer: &[u8]) -> windows_core::Result<ProviderI2cTransferResult>;
fn Read(&self, buffer: &mut [u8]) -> windows_core::Result<()>;
fn ReadPartial(&self, buffer: &mut [u8]) -> windows_core::Result<ProviderI2cTransferResult>;
fn WriteRead(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> windows_core::Result<()>;
fn WriteReadPartial(&self, writeBuffer: &[u8], readBuffer: &mut [u8]) -> windows_core::Result<ProviderI2cTransferResult>;
}
impl II2cDeviceProvider_Vtbl {
pub const fn new<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn DeviceId<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cDeviceProvider_Impl::DeviceId(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Write<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, buffer_array_size: u32, buffer: *const u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
II2cDeviceProvider_Impl::Write(this, core::slice::from_raw_parts(core::mem::transmute_copy(&buffer), buffer_array_size as usize)).into()
}
}
unsafe extern "system" fn WritePartial<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, buffer_array_size: u32, buffer: *const u8, result__: *mut ProviderI2cTransferResult) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cDeviceProvider_Impl::WritePartial(this, core::slice::from_raw_parts(core::mem::transmute_copy(&buffer), buffer_array_size as usize)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Read<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, buffer_array_size: u32, buffer: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
II2cDeviceProvider_Impl::Read(this, core::slice::from_raw_parts_mut(core::mem::transmute_copy(&buffer), buffer_array_size as usize)).into()
}
}
unsafe extern "system" fn ReadPartial<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, buffer_array_size: u32, buffer: *mut u8, result__: *mut ProviderI2cTransferResult) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cDeviceProvider_Impl::ReadPartial(this, core::slice::from_raw_parts_mut(core::mem::transmute_copy(&buffer), buffer_array_size as usize)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn WriteRead<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, writebuffer_array_size: u32, writebuffer: *const u8, readbuffer_array_size: u32, readbuffer: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
II2cDeviceProvider_Impl::WriteRead(this, core::slice::from_raw_parts(core::mem::transmute_copy(&writebuffer), writebuffer_array_size as usize), core::slice::from_raw_parts_mut(core::mem::transmute_copy(&readbuffer), readbuffer_array_size as usize)).into()
}
}
unsafe extern "system" fn WriteReadPartial<Identity: II2cDeviceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, writebuffer_array_size: u32, writebuffer: *const u8, readbuffer_array_size: u32, readbuffer: *mut u8, result__: *mut ProviderI2cTransferResult) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cDeviceProvider_Impl::WriteReadPartial(this, core::slice::from_raw_parts(core::mem::transmute_copy(&writebuffer), writebuffer_array_size as usize), core::slice::from_raw_parts_mut(core::mem::transmute_copy(&readbuffer), readbuffer_array_size as usize)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, II2cDeviceProvider, OFFSET>(),
DeviceId: DeviceId::<Identity, OFFSET>,
Write: Write::<Identity, OFFSET>,
WritePartial: WritePartial::<Identity, OFFSET>,
Read: Read::<Identity, OFFSET>,
ReadPartial: ReadPartial::<Identity, OFFSET>,
WriteRead: WriteRead::<Identity, OFFSET>,
WriteReadPartial: WriteReadPartial::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<II2cDeviceProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cDeviceProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Write: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8) -> windows_core::HRESULT,
pub WritePartial: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, *mut ProviderI2cTransferResult) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8) -> windows_core::HRESULT,
pub ReadPartial: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8, *mut ProviderI2cTransferResult) -> windows_core::HRESULT,
pub WriteRead: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, u32, *mut u8) -> windows_core::HRESULT,
pub WriteReadPartial: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, u32, *mut u8, *mut ProviderI2cTransferResult) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(II2cProvider, II2cProvider_Vtbl, 0x6f13083e_bf62_4fe2_a95a_f08999669818);
impl windows_core::RuntimeType for II2cProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(II2cProvider, windows_core::IUnknown, windows_core::IInspectable);
impl II2cProvider {
pub fn GetControllersAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<II2cControllerProvider>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllersAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for II2cProvider {
const NAME: &'static str = "Windows.Devices.I2c.Provider.II2cProvider";
}
pub trait II2cProvider_Impl: windows_core::IUnknownImpl {
fn GetControllersAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<II2cControllerProvider>>>;
}
impl II2cProvider_Vtbl {
pub const fn new<Identity: II2cProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetControllersAsync<Identity: II2cProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cProvider_Impl::GetControllersAsync(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, II2cProvider, OFFSET>(), GetControllersAsync: GetControllersAsync::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<II2cProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetControllersAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IProviderI2cConnectionSettings, IProviderI2cConnectionSettings_Vtbl, 0xe9db4e34_e510_44b7_809d_f2f85b555339);
impl windows_core::RuntimeType for IProviderI2cConnectionSettings {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IProviderI2cConnectionSettings_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SlaveAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SetSlaveAddress: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub BusSpeed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ProviderI2cBusSpeed) -> windows_core::HRESULT,
pub SetBusSpeed: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderI2cBusSpeed) -> windows_core::HRESULT,
pub SharingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ProviderI2cSharingMode) -> windows_core::HRESULT,
pub SetSharingMode: unsafe extern "system" fn(*mut core::ffi::c_void, ProviderI2cSharingMode) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderI2cBusSpeed(pub i32);
impl ProviderI2cBusSpeed {
pub const StandardMode: Self = Self(0i32);
pub const FastMode: Self = Self(1i32);
}
impl windows_core::TypeKind for ProviderI2cBusSpeed {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderI2cBusSpeed {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.I2c.Provider.ProviderI2cBusSpeed;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ProviderI2cConnectionSettings(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(ProviderI2cConnectionSettings, windows_core::IUnknown, windows_core::IInspectable);
impl ProviderI2cConnectionSettings {
pub fn SlaveAddress(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SlaveAddress)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetSlaveAddress(&self, value: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSlaveAddress)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn BusSpeed(&self) -> windows_core::Result<ProviderI2cBusSpeed> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BusSpeed)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetBusSpeed(&self, value: ProviderI2cBusSpeed) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetBusSpeed)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn SharingMode(&self) -> windows_core::Result<ProviderI2cSharingMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SharingMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetSharingMode(&self, value: ProviderI2cSharingMode) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSharingMode)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for ProviderI2cConnectionSettings {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IProviderI2cConnectionSettings>();
}
unsafe impl windows_core::Interface for ProviderI2cConnectionSettings {
type Vtable = <IProviderI2cConnectionSettings as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IProviderI2cConnectionSettings as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ProviderI2cConnectionSettings {
const NAME: &'static str = "Windows.Devices.I2c.Provider.ProviderI2cConnectionSettings";
}
unsafe impl Send for ProviderI2cConnectionSettings {}
unsafe impl Sync for ProviderI2cConnectionSettings {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderI2cSharingMode(pub i32);
impl ProviderI2cSharingMode {
pub const Exclusive: Self = Self(0i32);
pub const Shared: Self = Self(1i32);
}
impl windows_core::TypeKind for ProviderI2cSharingMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderI2cSharingMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.I2c.Provider.ProviderI2cSharingMode;i4)");
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct ProviderI2cTransferResult {
pub Status: ProviderI2cTransferStatus,
pub BytesTransferred: u32,
}
impl windows_core::TypeKind for ProviderI2cTransferResult {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderI2cTransferResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Devices.I2c.Provider.ProviderI2cTransferResult;enum(Windows.Devices.I2c.Provider.ProviderI2cTransferStatus;i4);u4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ProviderI2cTransferStatus(pub i32);
impl ProviderI2cTransferStatus {
pub const FullTransfer: Self = Self(0i32);
pub const PartialTransfer: Self = Self(1i32);
pub const SlaveAddressNotAcknowledged: Self = Self(2i32);
}
impl windows_core::TypeKind for ProviderI2cTransferStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ProviderI2cTransferStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.I2c.Provider.ProviderI2cTransferStatus;i4)");
}
+425
View File
@@ -0,0 +1,425 @@
#[cfg(feature = "Devices_I2c_Provider")]
pub mod Provider;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct I2cBusSpeed(pub i32);
impl I2cBusSpeed {
pub const StandardMode: Self = Self(0i32);
pub const FastMode: Self = Self(1i32);
}
impl windows_core::TypeKind for I2cBusSpeed {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for I2cBusSpeed {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.I2c.I2cBusSpeed;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct I2cConnectionSettings(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(I2cConnectionSettings, windows_core::IUnknown, windows_core::IInspectable);
impl I2cConnectionSettings {
pub fn SlaveAddress(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SlaveAddress)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetSlaveAddress(&self, value: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSlaveAddress)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn BusSpeed(&self) -> windows_core::Result<I2cBusSpeed> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BusSpeed)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetBusSpeed(&self, value: I2cBusSpeed) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetBusSpeed)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn SharingMode(&self) -> windows_core::Result<I2cSharingMode> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SharingMode)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetSharingMode(&self, value: I2cSharingMode) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSharingMode)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Create(slaveaddress: i32) -> windows_core::Result<I2cConnectionSettings> {
Self::II2cConnectionSettingsFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Create)(windows_core::Interface::as_raw(this), slaveaddress, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn II2cConnectionSettingsFactory<R, F: FnOnce(&II2cConnectionSettingsFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<I2cConnectionSettings, II2cConnectionSettingsFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for I2cConnectionSettings {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, II2cConnectionSettings>();
}
unsafe impl windows_core::Interface for I2cConnectionSettings {
type Vtable = <II2cConnectionSettings as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <II2cConnectionSettings as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for I2cConnectionSettings {
const NAME: &'static str = "Windows.Devices.I2c.I2cConnectionSettings";
}
unsafe impl Send for I2cConnectionSettings {}
unsafe impl Sync for I2cConnectionSettings {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct I2cController(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(I2cController, windows_core::IUnknown, windows_core::IInspectable);
impl I2cController {
pub fn GetDevice<P0>(&self, settings: P0) -> windows_core::Result<I2cDevice>
where
P0: windows_core::Param<I2cConnectionSettings>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDevice)(windows_core::Interface::as_raw(this), settings.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_I2c_Provider")]
pub fn GetControllersAsync<P0>(provider: P0) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<I2cController>>>
where
P0: windows_core::Param<Provider::II2cProvider>,
{
Self::II2cControllerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllersAsync)(windows_core::Interface::as_raw(this), provider.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDefaultAsync() -> windows_core::Result<windows_future::IAsyncOperation<I2cController>> {
Self::II2cControllerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefaultAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn II2cControllerStatics<R, F: FnOnce(&II2cControllerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<I2cController, II2cControllerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for I2cController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, II2cController>();
}
unsafe impl windows_core::Interface for I2cController {
type Vtable = <II2cController as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <II2cController as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for I2cController {
const NAME: &'static str = "Windows.Devices.I2c.I2cController";
}
unsafe impl Send for I2cController {}
unsafe impl Sync for I2cController {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct I2cDevice(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(I2cDevice, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(I2cDevice, super::super::Foundation::IClosable, II2cDeviceStatics);
impl I2cDevice {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn ConnectionSettings(&self) -> windows_core::Result<I2cConnectionSettings> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ConnectionSettings)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Write(&self, buffer: &[u8]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Write)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr()).ok() }
}
pub fn WritePartial(&self, buffer: &[u8]) -> windows_core::Result<I2cTransferResult> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WritePartial)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr(), &mut result__).map(|| result__)
}
}
pub fn Read(&self, buffer: &mut [u8]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Read)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr()).ok() }
}
pub fn ReadPartial(&self, buffer: &mut [u8]) -> windows_core::Result<I2cTransferResult> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReadPartial)(windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr(), &mut result__).map(|| result__)
}
}
pub fn WriteRead(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).WriteRead)(windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() }
}
pub fn WriteReadPartial(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> windows_core::Result<I2cTransferResult> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WriteReadPartial)(windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr(), &mut result__).map(|| result__)
}
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::II2cDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetDeviceSelectorFromFriendlyName(friendlyname: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
Self::II2cDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorFromFriendlyName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(friendlyname), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FromIdAsync<P1>(deviceid: &windows_core::HSTRING, settings: P1) -> windows_core::Result<windows_future::IAsyncOperation<I2cDevice>>
where
P1: windows_core::Param<I2cConnectionSettings>,
{
Self::II2cDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), settings.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn II2cDeviceStatics<R, F: FnOnce(&II2cDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<I2cDevice, II2cDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for I2cDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, II2cDevice>();
}
unsafe impl windows_core::Interface for I2cDevice {
type Vtable = <II2cDevice as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <II2cDevice as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for I2cDevice {
const NAME: &'static str = "Windows.Devices.I2c.I2cDevice";
}
unsafe impl Send for I2cDevice {}
unsafe impl Sync for I2cDevice {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct I2cSharingMode(pub i32);
impl I2cSharingMode {
pub const Exclusive: Self = Self(0i32);
pub const Shared: Self = Self(1i32);
}
impl windows_core::TypeKind for I2cSharingMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for I2cSharingMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.I2c.I2cSharingMode;i4)");
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct I2cTransferResult {
pub Status: I2cTransferStatus,
pub BytesTransferred: u32,
}
impl windows_core::TypeKind for I2cTransferResult {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for I2cTransferResult {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Devices.I2c.I2cTransferResult;enum(Windows.Devices.I2c.I2cTransferStatus;i4);u4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct I2cTransferStatus(pub i32);
impl I2cTransferStatus {
pub const FullTransfer: Self = Self(0i32);
pub const PartialTransfer: Self = Self(1i32);
pub const SlaveAddressNotAcknowledged: Self = Self(2i32);
pub const ClockStretchTimeout: Self = Self(3i32);
pub const UnknownError: Self = Self(4i32);
}
impl windows_core::TypeKind for I2cTransferStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for I2cTransferStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.I2c.I2cTransferStatus;i4)");
}
windows_core::imp::define_interface!(II2cConnectionSettings, II2cConnectionSettings_Vtbl, 0xf2db1307_ab6f_4639_a767_54536dc3460f);
impl windows_core::RuntimeType for II2cConnectionSettings {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cConnectionSettings_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SlaveAddress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SetSlaveAddress: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub BusSpeed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut I2cBusSpeed) -> windows_core::HRESULT,
pub SetBusSpeed: unsafe extern "system" fn(*mut core::ffi::c_void, I2cBusSpeed) -> windows_core::HRESULT,
pub SharingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut I2cSharingMode) -> windows_core::HRESULT,
pub SetSharingMode: unsafe extern "system" fn(*mut core::ffi::c_void, I2cSharingMode) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(II2cConnectionSettingsFactory, II2cConnectionSettingsFactory_Vtbl, 0x81b586b3_9693_41b1_a243_ded4f6e66926);
impl windows_core::RuntimeType for II2cConnectionSettingsFactory {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cConnectionSettingsFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(II2cController, II2cController_Vtbl, 0xc48ab1b2_87a0_4166_8e3e_b4b8f97cd729);
impl windows_core::RuntimeType for II2cController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cController_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(II2cControllerStatics, II2cControllerStatics_Vtbl, 0x40fc0365_5f05_4e7e_84bd_100db8e0aec5);
impl windows_core::RuntimeType for II2cControllerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cControllerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_I2c_Provider")]
pub GetControllersAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_I2c_Provider"))]
GetControllersAsync: usize,
pub GetDefaultAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(II2cDevice, II2cDevice_Vtbl, 0x8636c136_b9c5_4f70_9449_cc46dc6f57eb);
impl windows_core::RuntimeType for II2cDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cDevice_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ConnectionSettings: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Write: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8) -> windows_core::HRESULT,
pub WritePartial: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, *mut I2cTransferResult) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8) -> windows_core::HRESULT,
pub ReadPartial: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8, *mut I2cTransferResult) -> windows_core::HRESULT,
pub WriteRead: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, u32, *mut u8) -> windows_core::HRESULT,
pub WriteReadPartial: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, u32, *mut u8, *mut I2cTransferResult) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(II2cDeviceStatics, II2cDeviceStatics_Vtbl, 0x91a33be3_7334_4512_96bc_fbae9459f5f6);
impl windows_core::RuntimeType for II2cDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(II2cDeviceStatics, windows_core::IUnknown, windows_core::IInspectable);
impl II2cDeviceStatics {
pub fn GetDeviceSelector(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetDeviceSelectorFromFriendlyName(&self, friendlyname: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorFromFriendlyName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(friendlyname), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn FromIdAsync<P1>(&self, deviceid: &windows_core::HSTRING, settings: P1) -> windows_core::Result<windows_future::IAsyncOperation<I2cDevice>>
where
P1: windows_core::Param<I2cConnectionSettings>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), settings.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for II2cDeviceStatics {
const NAME: &'static str = "Windows.Devices.I2c.II2cDeviceStatics";
}
pub trait II2cDeviceStatics_Impl: windows_core::IUnknownImpl {
fn GetDeviceSelector(&self) -> windows_core::Result<windows_core::HSTRING>;
fn GetDeviceSelectorFromFriendlyName(&self, friendlyName: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING>;
fn FromIdAsync(&self, deviceId: &windows_core::HSTRING, settings: windows_core::Ref<I2cConnectionSettings>) -> windows_core::Result<windows_future::IAsyncOperation<I2cDevice>>;
}
impl II2cDeviceStatics_Vtbl {
pub const fn new<Identity: II2cDeviceStatics_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDeviceSelector<Identity: II2cDeviceStatics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cDeviceStatics_Impl::GetDeviceSelector(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDeviceSelectorFromFriendlyName<Identity: II2cDeviceStatics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, friendlyname: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cDeviceStatics_Impl::GetDeviceSelectorFromFriendlyName(this, core::mem::transmute(&friendlyname)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn FromIdAsync<Identity: II2cDeviceStatics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, deviceid: *mut core::ffi::c_void, settings: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match II2cDeviceStatics_Impl::FromIdAsync(this, core::mem::transmute(&deviceid), core::mem::transmute_copy(&settings)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, II2cDeviceStatics, OFFSET>(),
GetDeviceSelector: GetDeviceSelector::<Identity, OFFSET>,
GetDeviceSelectorFromFriendlyName: GetDeviceSelectorFromFriendlyName::<Identity, OFFSET>,
FromIdAsync: FromIdAsync::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<II2cDeviceStatics as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct II2cDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelectorFromFriendlyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: 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,
}
+638
View File
@@ -0,0 +1,638 @@
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct GazeDeviceConfigurationStatePreview(pub i32);
impl GazeDeviceConfigurationStatePreview {
pub const Unknown: Self = Self(0i32);
pub const Ready: Self = Self(1i32);
pub const Configuring: Self = Self(2i32);
pub const ScreenSetupNeeded: Self = Self(3i32);
pub const UserCalibrationNeeded: Self = Self(4i32);
}
impl windows_core::TypeKind for GazeDeviceConfigurationStatePreview {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for GazeDeviceConfigurationStatePreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Input.Preview.GazeDeviceConfigurationStatePreview;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeDevicePreview(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeDevicePreview, windows_core::IUnknown, windows_core::IInspectable);
impl GazeDevicePreview {
pub fn Id(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Id)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CanTrackEyes(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CanTrackEyes)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CanTrackHead(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CanTrackHead)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ConfigurationState(&self) -> windows_core::Result<GazeDeviceConfigurationStatePreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ConfigurationState)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn RequestCalibrationAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestCalibrationAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_HumanInterfaceDevice")]
pub fn GetNumericControlDescriptions(&self, usagepage: u16, usageid: u16) -> windows_core::Result<windows_collections::IVectorView<super::super::HumanInterfaceDevice::HidNumericControlDescription>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNumericControlDescriptions)(windows_core::Interface::as_raw(this), usagepage, usageid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_HumanInterfaceDevice")]
pub fn GetBooleanControlDescriptions(&self, usagepage: u16, usageid: u16) -> windows_core::Result<windows_collections::IVectorView<super::super::HumanInterfaceDevice::HidBooleanControlDescription>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetBooleanControlDescriptions)(windows_core::Interface::as_raw(this), usagepage, usageid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazeDevicePreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeDevicePreview>();
}
unsafe impl windows_core::Interface for GazeDevicePreview {
type Vtable = <IGazeDevicePreview as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeDevicePreview as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeDevicePreview {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeDevicePreview";
}
unsafe impl Send for GazeDevicePreview {}
unsafe impl Sync for GazeDevicePreview {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeDeviceWatcherAddedPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeDeviceWatcherAddedPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GazeDeviceWatcherAddedPreviewEventArgs {
pub fn Device(&self) -> windows_core::Result<GazeDevicePreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Device)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazeDeviceWatcherAddedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeDeviceWatcherAddedPreviewEventArgs>();
}
unsafe impl windows_core::Interface for GazeDeviceWatcherAddedPreviewEventArgs {
type Vtable = <IGazeDeviceWatcherAddedPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeDeviceWatcherAddedPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeDeviceWatcherAddedPreviewEventArgs {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeDeviceWatcherAddedPreviewEventArgs";
}
unsafe impl Send for GazeDeviceWatcherAddedPreviewEventArgs {}
unsafe impl Sync for GazeDeviceWatcherAddedPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeDeviceWatcherPreview(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeDeviceWatcherPreview, windows_core::IUnknown, windows_core::IInspectable);
impl GazeDeviceWatcherPreview {
pub fn Added<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GazeDeviceWatcherPreview, GazeDeviceWatcherAddedPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Added)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveAdded(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveAdded)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Removed<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GazeDeviceWatcherPreview, GazeDeviceWatcherRemovedPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Removed)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveRemoved(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveRemoved)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Updated<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GazeDeviceWatcherPreview, GazeDeviceWatcherUpdatedPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Updated)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveUpdated(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveUpdated)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn EnumerationCompleted<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GazeDeviceWatcherPreview, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EnumerationCompleted)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveEnumerationCompleted(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveEnumerationCompleted)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Stop(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Stop)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for GazeDeviceWatcherPreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeDeviceWatcherPreview>();
}
unsafe impl windows_core::Interface for GazeDeviceWatcherPreview {
type Vtable = <IGazeDeviceWatcherPreview as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeDeviceWatcherPreview as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeDeviceWatcherPreview {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeDeviceWatcherPreview";
}
unsafe impl Send for GazeDeviceWatcherPreview {}
unsafe impl Sync for GazeDeviceWatcherPreview {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeDeviceWatcherRemovedPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeDeviceWatcherRemovedPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GazeDeviceWatcherRemovedPreviewEventArgs {
pub fn Device(&self) -> windows_core::Result<GazeDevicePreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Device)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazeDeviceWatcherRemovedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeDeviceWatcherRemovedPreviewEventArgs>();
}
unsafe impl windows_core::Interface for GazeDeviceWatcherRemovedPreviewEventArgs {
type Vtable = <IGazeDeviceWatcherRemovedPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeDeviceWatcherRemovedPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeDeviceWatcherRemovedPreviewEventArgs {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeDeviceWatcherRemovedPreviewEventArgs";
}
unsafe impl Send for GazeDeviceWatcherRemovedPreviewEventArgs {}
unsafe impl Sync for GazeDeviceWatcherRemovedPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeDeviceWatcherUpdatedPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeDeviceWatcherUpdatedPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GazeDeviceWatcherUpdatedPreviewEventArgs {
pub fn Device(&self) -> windows_core::Result<GazeDevicePreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Device)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazeDeviceWatcherUpdatedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeDeviceWatcherUpdatedPreviewEventArgs>();
}
unsafe impl windows_core::Interface for GazeDeviceWatcherUpdatedPreviewEventArgs {
type Vtable = <IGazeDeviceWatcherUpdatedPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeDeviceWatcherUpdatedPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeDeviceWatcherUpdatedPreviewEventArgs {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeDeviceWatcherUpdatedPreviewEventArgs";
}
unsafe impl Send for GazeDeviceWatcherUpdatedPreviewEventArgs {}
unsafe impl Sync for GazeDeviceWatcherUpdatedPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeEnteredPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeEnteredPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GazeEnteredPreviewEventArgs {
pub fn Handled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Handled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetHandled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CurrentPoint(&self) -> windows_core::Result<GazePointPreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CurrentPoint)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazeEnteredPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeEnteredPreviewEventArgs>();
}
unsafe impl windows_core::Interface for GazeEnteredPreviewEventArgs {
type Vtable = <IGazeEnteredPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeEnteredPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeEnteredPreviewEventArgs {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeEnteredPreviewEventArgs";
}
unsafe impl Send for GazeEnteredPreviewEventArgs {}
unsafe impl Sync for GazeEnteredPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeExitedPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeExitedPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GazeExitedPreviewEventArgs {
pub fn Handled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Handled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetHandled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CurrentPoint(&self) -> windows_core::Result<GazePointPreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CurrentPoint)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazeExitedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeExitedPreviewEventArgs>();
}
unsafe impl windows_core::Interface for GazeExitedPreviewEventArgs {
type Vtable = <IGazeExitedPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeExitedPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeExitedPreviewEventArgs {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeExitedPreviewEventArgs";
}
unsafe impl Send for GazeExitedPreviewEventArgs {}
unsafe impl Sync for GazeExitedPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeInputSourcePreview(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeInputSourcePreview, windows_core::IUnknown, windows_core::IInspectable);
impl GazeInputSourcePreview {
pub fn GazeMoved<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GazeInputSourcePreview, GazeMovedPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GazeMoved)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveGazeMoved(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveGazeMoved)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GazeEntered<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GazeInputSourcePreview, GazeEnteredPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GazeEntered)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveGazeEntered(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveGazeEntered)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GazeExited<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<GazeInputSourcePreview, GazeExitedPreviewEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GazeExited)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveGazeExited(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveGazeExited)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetForCurrentView() -> windows_core::Result<GazeInputSourcePreview> {
Self::IGazeInputSourcePreviewStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn CreateWatcher() -> windows_core::Result<GazeDeviceWatcherPreview> {
Self::IGazeInputSourcePreviewStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateWatcher)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IGazeInputSourcePreviewStatics<R, F: FnOnce(&IGazeInputSourcePreviewStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<GazeInputSourcePreview, IGazeInputSourcePreviewStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for GazeInputSourcePreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeInputSourcePreview>();
}
unsafe impl windows_core::Interface for GazeInputSourcePreview {
type Vtable = <IGazeInputSourcePreview as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeInputSourcePreview as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeInputSourcePreview {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeInputSourcePreview";
}
unsafe impl Send for GazeInputSourcePreview {}
unsafe impl Sync for GazeInputSourcePreview {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazeMovedPreviewEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazeMovedPreviewEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl GazeMovedPreviewEventArgs {
pub fn Handled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Handled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetHandled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn CurrentPoint(&self) -> windows_core::Result<GazePointPreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CurrentPoint)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetIntermediatePoints(&self) -> windows_core::Result<windows_collections::IVector<GazePointPreview>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetIntermediatePoints)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazeMovedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazeMovedPreviewEventArgs>();
}
unsafe impl windows_core::Interface for GazeMovedPreviewEventArgs {
type Vtable = <IGazeMovedPreviewEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazeMovedPreviewEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazeMovedPreviewEventArgs {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazeMovedPreviewEventArgs";
}
unsafe impl Send for GazeMovedPreviewEventArgs {}
unsafe impl Sync for GazeMovedPreviewEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct GazePointPreview(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(GazePointPreview, windows_core::IUnknown, windows_core::IInspectable);
impl GazePointPreview {
pub fn SourceDevice(&self) -> windows_core::Result<GazeDevicePreview> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SourceDevice)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn EyeGazePosition(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::Point>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EyeGazePosition)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn HeadGazePosition(&self) -> windows_core::Result<super::super::super::Foundation::IReference<super::super::super::Foundation::Point>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HeadGazePosition)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Timestamp(&self) -> windows_core::Result<u64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Timestamp)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Devices_HumanInterfaceDevice")]
pub fn HidInputReport(&self) -> windows_core::Result<super::super::HumanInterfaceDevice::HidInputReport> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HidInputReport)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for GazePointPreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IGazePointPreview>();
}
unsafe impl windows_core::Interface for GazePointPreview {
type Vtable = <IGazePointPreview as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IGazePointPreview as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for GazePointPreview {
const NAME: &'static str = "Windows.Devices.Input.Preview.GazePointPreview";
}
unsafe impl Send for GazePointPreview {}
unsafe impl Sync for GazePointPreview {}
windows_core::imp::define_interface!(IGazeDevicePreview, IGazeDevicePreview_Vtbl, 0xe79e7ee9_b389_11e7_b201_c8d3ffb75721);
impl windows_core::RuntimeType for IGazeDevicePreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeDevicePreview_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Id: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub CanTrackEyes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub CanTrackHead: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub ConfigurationState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut GazeDeviceConfigurationStatePreview) -> windows_core::HRESULT,
pub RequestCalibrationAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Devices_HumanInterfaceDevice")]
pub GetNumericControlDescriptions: unsafe extern "system" fn(*mut core::ffi::c_void, u16, u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_HumanInterfaceDevice"))]
GetNumericControlDescriptions: usize,
#[cfg(feature = "Devices_HumanInterfaceDevice")]
pub GetBooleanControlDescriptions: unsafe extern "system" fn(*mut core::ffi::c_void, u16, u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_HumanInterfaceDevice"))]
GetBooleanControlDescriptions: usize,
}
windows_core::imp::define_interface!(IGazeDeviceWatcherAddedPreviewEventArgs, IGazeDeviceWatcherAddedPreviewEventArgs_Vtbl, 0xe79e7eed_b389_11e7_b201_c8d3ffb75721);
impl windows_core::RuntimeType for IGazeDeviceWatcherAddedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeDeviceWatcherAddedPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Device: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeDeviceWatcherPreview, IGazeDeviceWatcherPreview_Vtbl, 0xe79e7ee7_b389_11e7_b201_c8d3ffb75721);
impl windows_core::RuntimeType for IGazeDeviceWatcherPreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeDeviceWatcherPreview_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Added: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveAdded: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Removed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveRemoved: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Updated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub EnumerationCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveEnumerationCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeDeviceWatcherRemovedPreviewEventArgs, IGazeDeviceWatcherRemovedPreviewEventArgs_Vtbl, 0xf2631f08_0e3f_431f_a606_50b35af94a1c);
impl windows_core::RuntimeType for IGazeDeviceWatcherRemovedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeDeviceWatcherRemovedPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Device: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeDeviceWatcherUpdatedPreviewEventArgs, IGazeDeviceWatcherUpdatedPreviewEventArgs_Vtbl, 0x7fe830ef_7f08_4737_88e1_4a83ae4e4885);
impl windows_core::RuntimeType for IGazeDeviceWatcherUpdatedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeDeviceWatcherUpdatedPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Device: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeEnteredPreviewEventArgs, IGazeEnteredPreviewEventArgs_Vtbl, 0x2567bf43_1225_489f_9dd1_daa7c50fbf4b);
impl windows_core::RuntimeType for IGazeEnteredPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeEnteredPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Handled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetHandled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub CurrentPoint: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeExitedPreviewEventArgs, IGazeExitedPreviewEventArgs_Vtbl, 0x5d0af07e_7d83_40ef_9f0a_fbc1bbdcc5ac);
impl windows_core::RuntimeType for IGazeExitedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeExitedPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Handled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetHandled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub CurrentPoint: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeInputSourcePreview, IGazeInputSourcePreview_Vtbl, 0xe79e7ee8_b389_11e7_b201_c8d3ffb75721);
impl windows_core::RuntimeType for IGazeInputSourcePreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeInputSourcePreview_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GazeMoved: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveGazeMoved: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub GazeEntered: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveGazeEntered: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub GazeExited: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveGazeExited: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeInputSourcePreviewStatics, IGazeInputSourcePreviewStatics_Vtbl, 0xe79e7ee6_b389_11e7_b201_c8d3ffb75721);
impl windows_core::RuntimeType for IGazeInputSourcePreviewStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeInputSourcePreviewStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateWatcher: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazeMovedPreviewEventArgs, IGazeMovedPreviewEventArgs_Vtbl, 0xe79e7eeb_b389_11e7_b201_c8d3ffb75721);
impl windows_core::RuntimeType for IGazeMovedPreviewEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazeMovedPreviewEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Handled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetHandled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub CurrentPoint: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetIntermediatePoints: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IGazePointPreview, IGazePointPreview_Vtbl, 0xe79e7eea_b389_11e7_b201_c8d3ffb75721);
impl windows_core::RuntimeType for IGazePointPreview {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IGazePointPreview_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub SourceDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EyeGazePosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub HeadGazePosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Timestamp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
#[cfg(feature = "Devices_HumanInterfaceDevice")]
pub HidInputReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_HumanInterfaceDevice"))]
HidInputReport: usize,
}
+852
View File
@@ -0,0 +1,852 @@
#[cfg(feature = "Devices_Input_Preview")]
pub mod Preview;
windows_core::imp::define_interface!(IKeyboardCapabilities, IKeyboardCapabilities_Vtbl, 0x3a3f9b56_6798_4bbc_833e_0f34b17c65ff);
impl windows_core::RuntimeType for IKeyboardCapabilities {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IKeyboardCapabilities_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub KeyboardPresent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IMouseCapabilities, IMouseCapabilities_Vtbl, 0xbca5e023_7dd9_4b6b_9a92_55d43cb38f73);
impl windows_core::RuntimeType for IMouseCapabilities {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMouseCapabilities_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub MousePresent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub VerticalWheelPresent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub HorizontalWheelPresent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SwapButtons: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub NumberOfButtons: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IMouseDevice, IMouseDevice_Vtbl, 0x88edf458_f2c8_49f4_be1f_c256b388bc11);
impl windows_core::RuntimeType for IMouseDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMouseDevice_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub MouseMoved: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveMouseMoved: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IMouseDeviceStatics, IMouseDeviceStatics_Vtbl, 0x484a9045_6d70_49db_8e68_46ffbd17d38d);
impl windows_core::RuntimeType for IMouseDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMouseDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IMouseEventArgs, IMouseEventArgs_Vtbl, 0xf625aa5d_2354_4cc7_9230_96941c969fde);
impl windows_core::RuntimeType for IMouseEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IMouseEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub MouseDelta: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MouseDelta) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPenButtonListener, IPenButtonListener_Vtbl, 0x8245c376_1ee3_53f7_b1f7_8334a16f2815);
impl windows_core::RuntimeType for IPenButtonListener {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenButtonListener_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsSupportedChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveIsSupportedChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub TailButtonClicked: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveTailButtonClicked: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub TailButtonDoubleClicked: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveTailButtonDoubleClicked: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub TailButtonLongPressed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveTailButtonLongPressed: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPenButtonListenerStatics, IPenButtonListenerStatics_Vtbl, 0x19a8a584_862f_5f69_bfea_05f6584f133f);
impl windows_core::RuntimeType for IPenButtonListenerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenButtonListenerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPenDevice, IPenDevice_Vtbl, 0x31856eba_a738_5a8c_b8f6_f97ef68d18ef);
impl windows_core::RuntimeType for IPenDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenDevice_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PenId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPenDevice2, IPenDevice2_Vtbl, 0x0207d327_7fb8_5566_8c34_f8342037b7f9);
impl windows_core::RuntimeType for IPenDevice2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenDevice2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Haptics")]
pub SimpleHapticsController: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Haptics"))]
SimpleHapticsController: usize,
}
windows_core::imp::define_interface!(IPenDeviceStatics, IPenDeviceStatics_Vtbl, 0x9dfbbe01_0966_5180_bcb4_b85060e39479);
impl windows_core::RuntimeType for IPenDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetFromPointerId: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPenDockListener, IPenDockListener_Vtbl, 0x759f4d90_1dc0_55cb_ad18_b9101456f592);
impl windows_core::RuntimeType for IPenDockListener {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenDockListener_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsSupportedChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveIsSupportedChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Docked: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveDocked: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Undocked: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveUndocked: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPenDockListenerStatics, IPenDockListenerStatics_Vtbl, 0xcab75e9a_0016_5c72_969e_a97e11992a93);
impl windows_core::RuntimeType for IPenDockListenerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenDockListenerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefault: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPenDockedEventArgs, IPenDockedEventArgs_Vtbl, 0xfd4277c6_ca63_5d4e_9ed3_a28a54521c8c);
impl windows_core::RuntimeType for IPenDockedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenDockedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(IPenTailButtonClickedEventArgs, IPenTailButtonClickedEventArgs_Vtbl, 0x5d2fb7b6_6ad3_5d3e_ab29_05ea2410e390);
impl windows_core::RuntimeType for IPenTailButtonClickedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenTailButtonClickedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(IPenTailButtonDoubleClickedEventArgs, IPenTailButtonDoubleClickedEventArgs_Vtbl, 0x846321a2_618a_5478_b04c_b358231da4a7);
impl windows_core::RuntimeType for IPenTailButtonDoubleClickedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenTailButtonDoubleClickedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(IPenTailButtonLongPressedEventArgs, IPenTailButtonLongPressedEventArgs_Vtbl, 0xf37c606e_c60a_5f42_b818_a53112406c13);
impl windows_core::RuntimeType for IPenTailButtonLongPressedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenTailButtonLongPressedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(IPenUndockedEventArgs, IPenUndockedEventArgs_Vtbl, 0xccd09150_261b_59e6_a5d4_c1964cd03feb);
impl windows_core::RuntimeType for IPenUndockedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPenUndockedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(IPointerDevice, IPointerDevice_Vtbl, 0x93c9bafc_ebcb_467e_82c6_276feae36b5a);
impl windows_core::RuntimeType for IPointerDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPointerDevice_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PointerDeviceType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PointerDeviceType) -> windows_core::HRESULT,
pub IsIntegrated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub MaxContacts: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub PhysicalDeviceRect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
pub ScreenRect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::Rect) -> windows_core::HRESULT,
pub SupportedUsages: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPointerDevice2, IPointerDevice2_Vtbl, 0xf8a6d2a0_c484_489f_ae3e_30d2ee1ffd3e);
impl windows_core::RuntimeType for IPointerDevice2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPointerDevice2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub MaxPointersWithZDistance: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPointerDeviceStatics, IPointerDeviceStatics_Vtbl, 0xd8b89aa1_d1c6_416e_bd8d_5790914dc563);
impl windows_core::RuntimeType for IPointerDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPointerDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetPointerDevice: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPointerDevices: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ITouchCapabilities, ITouchCapabilities_Vtbl, 0x20dd55f9_13f1_46c8_9285_2c05fa3eda6f);
impl windows_core::RuntimeType for ITouchCapabilities {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ITouchCapabilities_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub TouchPresent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub Contacts: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct KeyboardCapabilities(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(KeyboardCapabilities, windows_core::IUnknown, windows_core::IInspectable);
impl KeyboardCapabilities {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<KeyboardCapabilities, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn KeyboardPresent(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyboardPresent)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for KeyboardCapabilities {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IKeyboardCapabilities>();
}
unsafe impl windows_core::Interface for KeyboardCapabilities {
type Vtable = <IKeyboardCapabilities as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IKeyboardCapabilities as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for KeyboardCapabilities {
const NAME: &'static str = "Windows.Devices.Input.KeyboardCapabilities";
}
unsafe impl Send for KeyboardCapabilities {}
unsafe impl Sync for KeyboardCapabilities {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct MouseCapabilities(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(MouseCapabilities, windows_core::IUnknown, windows_core::IInspectable);
impl MouseCapabilities {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<MouseCapabilities, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn MousePresent(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MousePresent)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn VerticalWheelPresent(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).VerticalWheelPresent)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn HorizontalWheelPresent(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HorizontalWheelPresent)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SwapButtons(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SwapButtons)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn NumberOfButtons(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NumberOfButtons)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for MouseCapabilities {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IMouseCapabilities>();
}
unsafe impl windows_core::Interface for MouseCapabilities {
type Vtable = <IMouseCapabilities as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IMouseCapabilities as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for MouseCapabilities {
const NAME: &'static str = "Windows.Devices.Input.MouseCapabilities";
}
unsafe impl Send for MouseCapabilities {}
unsafe impl Sync for MouseCapabilities {}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MouseDelta {
pub X: i32,
pub Y: i32,
}
impl windows_core::TypeKind for MouseDelta {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for MouseDelta {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Devices.Input.MouseDelta;i4;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct MouseDevice(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(MouseDevice, windows_core::IUnknown, windows_core::IInspectable);
impl MouseDevice {
pub fn MouseMoved<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<MouseDevice, MouseEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MouseMoved)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveMouseMoved(&self, cookie: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveMouseMoved)(windows_core::Interface::as_raw(this), cookie).ok() }
}
pub fn GetForCurrentView() -> windows_core::Result<MouseDevice> {
Self::IMouseDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForCurrentView)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IMouseDeviceStatics<R, F: FnOnce(&IMouseDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<MouseDevice, IMouseDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for MouseDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IMouseDevice>();
}
unsafe impl windows_core::Interface for MouseDevice {
type Vtable = <IMouseDevice as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IMouseDevice as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for MouseDevice {
const NAME: &'static str = "Windows.Devices.Input.MouseDevice";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct MouseEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(MouseEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl MouseEventArgs {
pub fn MouseDelta(&self) -> windows_core::Result<MouseDelta> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MouseDelta)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for MouseEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IMouseEventArgs>();
}
unsafe impl windows_core::Interface for MouseEventArgs {
type Vtable = <IMouseEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IMouseEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for MouseEventArgs {
const NAME: &'static str = "Windows.Devices.Input.MouseEventArgs";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenButtonListener(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenButtonListener, windows_core::IUnknown, windows_core::IInspectable);
impl PenButtonListener {
pub fn IsSupported(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsSupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsSupportedChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PenButtonListener, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsSupportedChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveIsSupportedChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveIsSupportedChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn TailButtonClicked<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PenButtonListener, PenTailButtonClickedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TailButtonClicked)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveTailButtonClicked(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveTailButtonClicked)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn TailButtonDoubleClicked<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PenButtonListener, PenTailButtonDoubleClickedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TailButtonDoubleClicked)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveTailButtonDoubleClicked(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveTailButtonDoubleClicked)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn TailButtonLongPressed<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PenButtonListener, PenTailButtonLongPressedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TailButtonLongPressed)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveTailButtonLongPressed(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveTailButtonLongPressed)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetDefault() -> windows_core::Result<PenButtonListener> {
Self::IPenButtonListenerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefault)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPenButtonListenerStatics<R, F: FnOnce(&IPenButtonListenerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PenButtonListener, IPenButtonListenerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PenButtonListener {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenButtonListener>();
}
unsafe impl windows_core::Interface for PenButtonListener {
type Vtable = <IPenButtonListener as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenButtonListener as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenButtonListener {
const NAME: &'static str = "Windows.Devices.Input.PenButtonListener";
}
unsafe impl Send for PenButtonListener {}
unsafe impl Sync for PenButtonListener {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenDevice(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenDevice, windows_core::IUnknown, windows_core::IInspectable);
impl PenDevice {
pub fn PenId(&self) -> windows_core::Result<windows_core::GUID> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PenId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Devices_Haptics")]
pub fn SimpleHapticsController(&self) -> windows_core::Result<super::Haptics::SimpleHapticsController> {
let this = &windows_core::Interface::cast::<IPenDevice2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SimpleHapticsController)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetFromPointerId(pointerid: u32) -> windows_core::Result<PenDevice> {
Self::IPenDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetFromPointerId)(windows_core::Interface::as_raw(this), pointerid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPenDeviceStatics<R, F: FnOnce(&IPenDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PenDevice, IPenDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PenDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenDevice>();
}
unsafe impl windows_core::Interface for PenDevice {
type Vtable = <IPenDevice as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenDevice as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenDevice {
const NAME: &'static str = "Windows.Devices.Input.PenDevice";
}
unsafe impl Send for PenDevice {}
unsafe impl Sync for PenDevice {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenDockListener(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenDockListener, windows_core::IUnknown, windows_core::IInspectable);
impl PenDockListener {
pub fn IsSupported(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsSupported)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsSupportedChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PenDockListener, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsSupportedChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveIsSupportedChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveIsSupportedChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Docked<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PenDockListener, PenDockedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Docked)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveDocked(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveDocked)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn Undocked<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<PenDockListener, PenUndockedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Undocked)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveUndocked(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveUndocked)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetDefault() -> windows_core::Result<PenDockListener> {
Self::IPenDockListenerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefault)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPenDockListenerStatics<R, F: FnOnce(&IPenDockListenerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PenDockListener, IPenDockListenerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PenDockListener {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenDockListener>();
}
unsafe impl windows_core::Interface for PenDockListener {
type Vtable = <IPenDockListener as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenDockListener as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenDockListener {
const NAME: &'static str = "Windows.Devices.Input.PenDockListener";
}
unsafe impl Send for PenDockListener {}
unsafe impl Sync for PenDockListener {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenDockedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenDockedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PenDockedEventArgs {}
impl windows_core::RuntimeType for PenDockedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenDockedEventArgs>();
}
unsafe impl windows_core::Interface for PenDockedEventArgs {
type Vtable = <IPenDockedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenDockedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenDockedEventArgs {
const NAME: &'static str = "Windows.Devices.Input.PenDockedEventArgs";
}
unsafe impl Send for PenDockedEventArgs {}
unsafe impl Sync for PenDockedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenTailButtonClickedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenTailButtonClickedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PenTailButtonClickedEventArgs {}
impl windows_core::RuntimeType for PenTailButtonClickedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenTailButtonClickedEventArgs>();
}
unsafe impl windows_core::Interface for PenTailButtonClickedEventArgs {
type Vtable = <IPenTailButtonClickedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenTailButtonClickedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenTailButtonClickedEventArgs {
const NAME: &'static str = "Windows.Devices.Input.PenTailButtonClickedEventArgs";
}
unsafe impl Send for PenTailButtonClickedEventArgs {}
unsafe impl Sync for PenTailButtonClickedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenTailButtonDoubleClickedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenTailButtonDoubleClickedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PenTailButtonDoubleClickedEventArgs {}
impl windows_core::RuntimeType for PenTailButtonDoubleClickedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenTailButtonDoubleClickedEventArgs>();
}
unsafe impl windows_core::Interface for PenTailButtonDoubleClickedEventArgs {
type Vtable = <IPenTailButtonDoubleClickedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenTailButtonDoubleClickedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenTailButtonDoubleClickedEventArgs {
const NAME: &'static str = "Windows.Devices.Input.PenTailButtonDoubleClickedEventArgs";
}
unsafe impl Send for PenTailButtonDoubleClickedEventArgs {}
unsafe impl Sync for PenTailButtonDoubleClickedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenTailButtonLongPressedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenTailButtonLongPressedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PenTailButtonLongPressedEventArgs {}
impl windows_core::RuntimeType for PenTailButtonLongPressedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenTailButtonLongPressedEventArgs>();
}
unsafe impl windows_core::Interface for PenTailButtonLongPressedEventArgs {
type Vtable = <IPenTailButtonLongPressedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenTailButtonLongPressedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenTailButtonLongPressedEventArgs {
const NAME: &'static str = "Windows.Devices.Input.PenTailButtonLongPressedEventArgs";
}
unsafe impl Send for PenTailButtonLongPressedEventArgs {}
unsafe impl Sync for PenTailButtonLongPressedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PenUndockedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PenUndockedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PenUndockedEventArgs {}
impl windows_core::RuntimeType for PenUndockedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPenUndockedEventArgs>();
}
unsafe impl windows_core::Interface for PenUndockedEventArgs {
type Vtable = <IPenUndockedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPenUndockedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PenUndockedEventArgs {
const NAME: &'static str = "Windows.Devices.Input.PenUndockedEventArgs";
}
unsafe impl Send for PenUndockedEventArgs {}
unsafe impl Sync for PenUndockedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PointerDevice(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PointerDevice, windows_core::IUnknown, windows_core::IInspectable);
impl PointerDevice {
pub fn PointerDeviceType(&self) -> windows_core::Result<PointerDeviceType> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerDeviceType)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsIntegrated(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsIntegrated)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MaxContacts(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxContacts)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn PhysicalDeviceRect(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PhysicalDeviceRect)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ScreenRect(&self) -> windows_core::Result<super::super::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ScreenRect)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SupportedUsages(&self) -> windows_core::Result<windows_collections::IVectorView<PointerDeviceUsage>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SupportedUsages)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn MaxPointersWithZDistance(&self) -> windows_core::Result<u32> {
let this = &windows_core::Interface::cast::<IPointerDevice2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxPointersWithZDistance)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetPointerDevice(pointerid: u32) -> windows_core::Result<PointerDevice> {
Self::IPointerDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPointerDevice)(windows_core::Interface::as_raw(this), pointerid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetPointerDevices() -> windows_core::Result<windows_collections::IVectorView<PointerDevice>> {
Self::IPointerDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPointerDevices)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPointerDeviceStatics<R, F: FnOnce(&IPointerDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PointerDevice, IPointerDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PointerDevice {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPointerDevice>();
}
unsafe impl windows_core::Interface for PointerDevice {
type Vtable = <IPointerDevice as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPointerDevice as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PointerDevice {
const NAME: &'static str = "Windows.Devices.Input.PointerDevice";
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PointerDeviceType(pub i32);
impl PointerDeviceType {
pub const Touch: Self = Self(0i32);
pub const Pen: Self = Self(1i32);
pub const Mouse: Self = Self(2i32);
pub const Touchpad: Self = Self(3i32);
}
impl windows_core::TypeKind for PointerDeviceType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PointerDeviceType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Input.PointerDeviceType;i4)");
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct PointerDeviceUsage {
pub UsagePage: u32,
pub Usage: u32,
pub MinLogical: i32,
pub MaxLogical: i32,
pub MinPhysical: i32,
pub MaxPhysical: i32,
pub Unit: u32,
pub PhysicalMultiplier: f32,
}
impl windows_core::TypeKind for PointerDeviceUsage {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PointerDeviceUsage {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Devices.Input.PointerDeviceUsage;u4;u4;i4;i4;i4;i4;u4;f4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct TouchCapabilities(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(TouchCapabilities, windows_core::IUnknown, windows_core::IInspectable);
impl TouchCapabilities {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<R, F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<TouchCapabilities, windows_core::imp::IGenericFactory> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn TouchPresent(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TouchPresent)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Contacts(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Contacts)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for TouchCapabilities {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ITouchCapabilities>();
}
unsafe impl windows_core::Interface for TouchCapabilities {
type Vtable = <ITouchCapabilities as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ITouchCapabilities as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for TouchCapabilities {
const NAME: &'static str = "Windows.Devices.Input.TouchCapabilities";
}
unsafe impl Send for TouchCapabilities {}
unsafe impl Sync for TouchCapabilities {}
File diff suppressed because it is too large Load Diff
+684
View File
@@ -0,0 +1,684 @@
#[cfg(feature = "Devices_Lights_Effects")]
pub mod Effects;
windows_core::imp::define_interface!(ILamp, ILamp_Vtbl, 0x047d5b9a_ea45_4b2b_b1a2_14dff00bde7b);
impl windows_core::RuntimeType for ILamp {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILamp_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub BrightnessLevel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub SetBrightnessLevel: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT,
pub IsColorSettable: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
#[cfg(feature = "UI")]
pub Color: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
Color: usize,
#[cfg(feature = "UI")]
pub SetColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetColor: usize,
pub AvailabilityChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveAvailabilityChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILampArray, ILampArray_Vtbl, 0x7ace9787_c8a0_4e95_a1e0_d58676538649);
impl windows_core::RuntimeType for ILampArray {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILampArray_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub HardwareVendorId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub HardwareProductId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub HardwareVersion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub LampArrayKind: unsafe extern "system" fn(*mut core::ffi::c_void, *mut LampArrayKind) -> windows_core::HRESULT,
pub LampCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub MinUpdateInterval: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub BoundingBox: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_numerics::Vector3) -> windows_core::HRESULT,
pub IsEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub BrightnessLevel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetBrightnessLevel: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub IsConnected: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SupportsVirtualKeys: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub GetLampInfo: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "System")]
pub GetIndicesForKey: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::System::VirtualKey, *mut u32, *mut *mut i32) -> windows_core::HRESULT,
#[cfg(not(feature = "System"))]
GetIndicesForKey: usize,
pub GetIndicesForPurposes: unsafe extern "system" fn(*mut core::ffi::c_void, LampPurposes, *mut u32, *mut *mut i32) -> windows_core::HRESULT,
#[cfg(feature = "UI")]
pub SetColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetColor: usize,
#[cfg(feature = "UI")]
pub SetColorForIndex: unsafe extern "system" fn(*mut core::ffi::c_void, i32, super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetColorForIndex: usize,
#[cfg(feature = "UI")]
pub SetSingleColorForIndices: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color, u32, *const i32) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetSingleColorForIndices: usize,
#[cfg(feature = "UI")]
pub SetColorsForIndices: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::UI::Color, u32, *const i32) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetColorsForIndices: usize,
#[cfg(all(feature = "System", feature = "UI"))]
pub SetColorsForKey: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color, super::super::System::VirtualKey) -> windows_core::HRESULT,
#[cfg(not(all(feature = "System", feature = "UI")))]
SetColorsForKey: usize,
#[cfg(all(feature = "System", feature = "UI"))]
pub SetColorsForKeys: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::UI::Color, u32, *const super::super::System::VirtualKey) -> windows_core::HRESULT,
#[cfg(not(all(feature = "System", feature = "UI")))]
SetColorsForKeys: usize,
#[cfg(feature = "UI")]
pub SetColorsForPurposes: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color, LampPurposes) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
SetColorsForPurposes: usize,
#[cfg(feature = "Storage_Streams")]
pub SendMessageAsync: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
SendMessageAsync: usize,
#[cfg(feature = "Storage_Streams")]
pub RequestMessageAsync: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Streams"))]
RequestMessageAsync: usize,
}
windows_core::imp::define_interface!(ILampArray2, ILampArray2_Vtbl, 0x050c181f_60a8_4711_a1af_1b1b4c658ea2);
impl windows_core::RuntimeType for ILampArray2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILampArray2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsAvailable: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub AvailabilityChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveAvailabilityChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILampArrayStatics, ILampArrayStatics_Vtbl, 0x7bb8c98d_5fc1_452d_bb1f_4ad410d398ff);
impl windows_core::RuntimeType for ILampArrayStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILampArrayStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILampAvailabilityChangedEventArgs, ILampAvailabilityChangedEventArgs_Vtbl, 0x4f6e3ded_07a2_499d_9260_67e304532ba4);
impl windows_core::RuntimeType for ILampAvailabilityChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILampAvailabilityChangedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsAvailable: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILampInfo, ILampInfo_Vtbl, 0x30bb521c_0acf_49da_8c10_150b9cf62713);
impl windows_core::RuntimeType for ILampInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILampInfo_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Index: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub Purposes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut LampPurposes) -> windows_core::HRESULT,
pub Position: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_numerics::Vector3) -> windows_core::HRESULT,
pub RedLevelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub GreenLevelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub BlueLevelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub GainLevelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
#[cfg(feature = "UI")]
pub FixedColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
FixedColor: usize,
#[cfg(feature = "UI")]
pub GetNearestSupportedColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::UI::Color, *mut super::super::UI::Color) -> windows_core::HRESULT,
#[cfg(not(feature = "UI"))]
GetNearestSupportedColor: usize,
pub UpdateLatency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(ILampStatics, ILampStatics_Vtbl, 0xa822416c_8885_401e_b821_8e8b38a8e8ec);
impl windows_core::RuntimeType for ILampStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct ILampStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDefaultAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Lamp(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(Lamp, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(Lamp, super::super::Foundation::IClosable);
impl Lamp {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn IsEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIsEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn BrightnessLevel(&self) -> windows_core::Result<f32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BrightnessLevel)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetBrightnessLevel(&self, value: f32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetBrightnessLevel)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsColorSettable(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsColorSettable)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "UI")]
pub fn Color(&self) -> windows_core::Result<super::super::UI::Color> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Color)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "UI")]
pub fn SetColor(&self, value: super::super::UI::Color) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetColor)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn AvailabilityChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<Lamp, LampAvailabilityChangedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AvailabilityChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveAvailabilityChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveAvailabilityChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::ILampStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<Lamp>> {
Self::ILampStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDefaultAsync() -> windows_core::Result<windows_future::IAsyncOperation<Lamp>> {
Self::ILampStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefaultAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn ILampStatics<R, F: FnOnce(&ILampStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<Lamp, ILampStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for Lamp {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILamp>();
}
unsafe impl windows_core::Interface for Lamp {
type Vtable = <ILamp as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILamp as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Lamp {
const NAME: &'static str = "Windows.Devices.Lights.Lamp";
}
unsafe impl Send for Lamp {}
unsafe impl Sync for Lamp {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LampArray(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LampArray, windows_core::IUnknown, windows_core::IInspectable);
impl LampArray {
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn HardwareVendorId(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HardwareVendorId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn HardwareProductId(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HardwareProductId)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn HardwareVersion(&self) -> windows_core::Result<u16> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HardwareVersion)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn LampArrayKind(&self) -> windows_core::Result<LampArrayKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LampArrayKind)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn LampCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LampCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MinUpdateInterval(&self) -> windows_core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinUpdateInterval)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn BoundingBox(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BoundingBox)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsEnabled)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIsEnabled)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn BrightnessLevel(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BrightnessLevel)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetBrightnessLevel(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetBrightnessLevel)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn IsConnected(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsConnected)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SupportsVirtualKeys(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SupportsVirtualKeys)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GetLampInfo(&self, lampindex: i32) -> windows_core::Result<LampInfo> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetLampInfo)(windows_core::Interface::as_raw(this), lampindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "System")]
pub fn GetIndicesForKey(&self, key: super::super::System::VirtualKey) -> windows_core::Result<windows_core::Array<i32>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetIndicesForKey)(windows_core::Interface::as_raw(this), key, windows_core::Array::<i32>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
pub fn GetIndicesForPurposes(&self, purposes: LampPurposes) -> windows_core::Result<windows_core::Array<i32>> {
let this = self;
unsafe {
let mut result__ = core::mem::MaybeUninit::zeroed();
(windows_core::Interface::vtable(this).GetIndicesForPurposes)(windows_core::Interface::as_raw(this), purposes, windows_core::Array::<i32>::set_abi_len(core::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).map(|| result__.assume_init())
}
}
#[cfg(feature = "UI")]
pub fn SetColor(&self, desiredcolor: super::super::UI::Color) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetColor)(windows_core::Interface::as_raw(this), desiredcolor).ok() }
}
#[cfg(feature = "UI")]
pub fn SetColorForIndex(&self, lampindex: i32, desiredcolor: super::super::UI::Color) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetColorForIndex)(windows_core::Interface::as_raw(this), lampindex, desiredcolor).ok() }
}
#[cfg(feature = "UI")]
pub fn SetSingleColorForIndices(&self, desiredcolor: super::super::UI::Color, lampindexes: &[i32]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSingleColorForIndices)(windows_core::Interface::as_raw(this), desiredcolor, lampindexes.len().try_into().unwrap(), lampindexes.as_ptr()).ok() }
}
#[cfg(feature = "UI")]
pub fn SetColorsForIndices(&self, desiredcolors: &[super::super::UI::Color], lampindexes: &[i32]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetColorsForIndices)(windows_core::Interface::as_raw(this), desiredcolors.len().try_into().unwrap(), desiredcolors.as_ptr(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr()).ok() }
}
#[cfg(all(feature = "System", feature = "UI"))]
pub fn SetColorsForKey(&self, desiredcolor: super::super::UI::Color, key: super::super::System::VirtualKey) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetColorsForKey)(windows_core::Interface::as_raw(this), desiredcolor, key).ok() }
}
#[cfg(all(feature = "System", feature = "UI"))]
pub fn SetColorsForKeys(&self, desiredcolors: &[super::super::UI::Color], keys: &[super::super::System::VirtualKey]) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetColorsForKeys)(windows_core::Interface::as_raw(this), desiredcolors.len().try_into().unwrap(), desiredcolors.as_ptr(), keys.len().try_into().unwrap(), keys.as_ptr()).ok() }
}
#[cfg(feature = "UI")]
pub fn SetColorsForPurposes(&self, desiredcolor: super::super::UI::Color, purposes: LampPurposes) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetColorsForPurposes)(windows_core::Interface::as_raw(this), desiredcolor, purposes).ok() }
}
#[cfg(feature = "Storage_Streams")]
pub fn SendMessageAsync<P1>(&self, messageid: i32, message: P1) -> windows_core::Result<windows_future::IAsyncAction>
where
P1: windows_core::Param<super::super::Storage::Streams::IBuffer>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SendMessageAsync)(windows_core::Interface::as_raw(this), messageid, message.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Streams")]
pub fn RequestMessageAsync(&self, messageid: i32) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Storage::Streams::IBuffer>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestMessageAsync)(windows_core::Interface::as_raw(this), messageid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IsAvailable(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<ILampArray2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsAvailable)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn AvailabilityChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<LampArray, windows_core::IInspectable>>,
{
let this = &windows_core::Interface::cast::<ILampArray2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AvailabilityChanged)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveAvailabilityChanged(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<ILampArray2>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemoveAvailabilityChanged)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::ILampArrayStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<LampArray>> {
Self::ILampArrayStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn ILampArrayStatics<R, F: FnOnce(&ILampArrayStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<LampArray, ILampArrayStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for LampArray {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILampArray>();
}
unsafe impl windows_core::Interface for LampArray {
type Vtable = <ILampArray as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILampArray as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LampArray {
const NAME: &'static str = "Windows.Devices.Lights.LampArray";
}
unsafe impl Send for LampArray {}
unsafe impl Sync for LampArray {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct LampArrayKind(pub i32);
impl LampArrayKind {
pub const Undefined: Self = Self(0i32);
pub const Keyboard: Self = Self(1i32);
pub const Mouse: Self = Self(2i32);
pub const GameController: Self = Self(3i32);
pub const Peripheral: Self = Self(4i32);
pub const Scene: Self = Self(5i32);
pub const Notification: Self = Self(6i32);
pub const Chassis: Self = Self(7i32);
pub const Wearable: Self = Self(8i32);
pub const Furniture: Self = Self(9i32);
pub const Art: Self = Self(10i32);
pub const Headset: Self = Self(11i32);
pub const Microphone: Self = Self(12i32);
pub const Speaker: Self = Self(13i32);
}
impl windows_core::TypeKind for LampArrayKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for LampArrayKind {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Lights.LampArrayKind;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LampAvailabilityChangedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LampAvailabilityChangedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl LampAvailabilityChangedEventArgs {
pub fn IsAvailable(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsAvailable)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for LampAvailabilityChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILampAvailabilityChangedEventArgs>();
}
unsafe impl windows_core::Interface for LampAvailabilityChangedEventArgs {
type Vtable = <ILampAvailabilityChangedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILampAvailabilityChangedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LampAvailabilityChangedEventArgs {
const NAME: &'static str = "Windows.Devices.Lights.LampAvailabilityChangedEventArgs";
}
unsafe impl Send for LampAvailabilityChangedEventArgs {}
unsafe impl Sync for LampAvailabilityChangedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LampInfo(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(LampInfo, windows_core::IUnknown, windows_core::IInspectable);
impl LampInfo {
pub fn Index(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Index)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Purposes(&self) -> windows_core::Result<LampPurposes> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Purposes)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Position(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Position)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn RedLevelCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RedLevelCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GreenLevelCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GreenLevelCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn BlueLevelCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BlueLevelCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn GainLevelCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GainLevelCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
#[cfg(feature = "UI")]
pub fn FixedColor(&self) -> windows_core::Result<super::super::Foundation::IReference<super::super::UI::Color>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FixedColor)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI")]
pub fn GetNearestSupportedColor(&self, desiredcolor: super::super::UI::Color) -> windows_core::Result<super::super::UI::Color> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetNearestSupportedColor)(windows_core::Interface::as_raw(this), desiredcolor, &mut result__).map(|| result__)
}
}
pub fn UpdateLatency(&self) -> windows_core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UpdateLatency)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for LampInfo {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, ILampInfo>();
}
unsafe impl windows_core::Interface for LampInfo {
type Vtable = <ILampInfo as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILampInfo as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LampInfo {
const NAME: &'static str = "Windows.Devices.Lights.LampInfo";
}
unsafe impl Send for LampInfo {}
unsafe impl Sync for LampInfo {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct LampPurposes(pub u32);
impl LampPurposes {
pub const Undefined: Self = Self(0u32);
pub const Control: Self = Self(1u32);
pub const Accent: Self = Self(2u32);
pub const Branding: Self = Self(4u32);
pub const Status: Self = Self(8u32);
pub const Illumination: Self = Self(16u32);
pub const Presentation: Self = Self(32u32);
}
impl windows_core::TypeKind for LampPurposes {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for LampPurposes {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Lights.LampPurposes;u4)");
}
impl LampPurposes {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for LampPurposes {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for LampPurposes {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for LampPurposes {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for LampPurposes {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for LampPurposes {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+88
View File
@@ -0,0 +1,88 @@
windows_core::imp::define_interface!(IServiceDeviceStatics, IServiceDeviceStatics_Vtbl, 0xa88214e1_59c7_4a20_aba6_9f6707937230);
impl windows_core::RuntimeType for IServiceDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IServiceDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, ServiceDeviceType, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelectorFromServiceId: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IStorageDeviceStatics, IStorageDeviceStatics_Vtbl, 0x5ece44ee_1b23_4dd2_8652_bc164f003128);
impl windows_core::RuntimeType for IStorageDeviceStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IStorageDeviceStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Storage_Search")]
pub FromId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Storage_Search"))]
FromId: usize,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub struct ServiceDevice;
impl ServiceDevice {
pub fn GetDeviceSelector(servicetype: ServiceDeviceType) -> windows_core::Result<windows_core::HSTRING> {
Self::IServiceDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), servicetype, &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetDeviceSelectorFromServiceId(serviceid: windows_core::GUID) -> windows_core::Result<windows_core::HSTRING> {
Self::IServiceDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorFromServiceId)(windows_core::Interface::as_raw(this), serviceid, &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IServiceDeviceStatics<R, F: FnOnce(&IServiceDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<ServiceDevice, IServiceDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for ServiceDevice {
const NAME: &'static str = "Windows.Devices.Portable.ServiceDevice";
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ServiceDeviceType(pub i32);
impl ServiceDeviceType {
pub const CalendarService: Self = Self(0i32);
pub const ContactsService: Self = Self(1i32);
pub const DeviceStatusService: Self = Self(2i32);
pub const NotesService: Self = Self(3i32);
pub const RingtonesService: Self = Self(4i32);
pub const SmsService: Self = Self(5i32);
pub const TasksService: Self = Self(6i32);
}
impl windows_core::TypeKind for ServiceDeviceType {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ServiceDeviceType {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Portable.ServiceDeviceType;i4)");
}
pub struct StorageDevice;
impl StorageDevice {
#[cfg(feature = "Storage_Search")]
pub fn FromId(deviceid: &windows_core::HSTRING) -> windows_core::Result<super::super::Storage::StorageFolder> {
Self::IStorageDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromId)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::IStorageDeviceStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IStorageDeviceStatics<R, F: FnOnce(&IStorageDeviceStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<StorageDevice, IStorageDeviceStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for StorageDevice {
const NAME: &'static str = "Windows.Devices.Portable.StorageDevice";
}
+292
View File
@@ -0,0 +1,292 @@
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Battery(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(Battery, windows_core::IUnknown, windows_core::IInspectable);
impl Battery {
pub fn DeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetReport(&self) -> windows_core::Result<BatteryReport> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetReport)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ReportUpdated<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::TypedEventHandler<Battery, windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ReportUpdated)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveReportUpdated(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveReportUpdated)(windows_core::Interface::as_raw(this), token).ok() }
}
pub fn AggregateBattery() -> windows_core::Result<Battery> {
Self::IBatteryStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AggregateBattery)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<Battery>> {
Self::IBatteryStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::IBatteryStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
fn IBatteryStatics<R, F: FnOnce(&IBatteryStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<Battery, IBatteryStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for Battery {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IBattery>();
}
unsafe impl windows_core::Interface for Battery {
type Vtable = <IBattery as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IBattery as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Battery {
const NAME: &'static str = "Windows.Devices.Power.Battery";
}
unsafe impl Send for Battery {}
unsafe impl Sync for Battery {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct BatteryReport(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(BatteryReport, windows_core::IUnknown, windows_core::IInspectable);
impl BatteryReport {
pub fn ChargeRateInMilliwatts(&self) -> windows_core::Result<super::super::Foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ChargeRateInMilliwatts)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DesignCapacityInMilliwattHours(&self) -> windows_core::Result<super::super::Foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DesignCapacityInMilliwattHours)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn FullChargeCapacityInMilliwattHours(&self) -> windows_core::Result<super::super::Foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FullChargeCapacityInMilliwattHours)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RemainingCapacityInMilliwattHours(&self) -> windows_core::Result<super::super::Foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RemainingCapacityInMilliwattHours)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "System_Power")]
pub fn Status(&self) -> windows_core::Result<super::super::System::Power::BatteryStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for BatteryReport {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IBatteryReport>();
}
unsafe impl windows_core::Interface for BatteryReport {
type Vtable = <IBatteryReport as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IBatteryReport as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for BatteryReport {
const NAME: &'static str = "Windows.Devices.Power.BatteryReport";
}
unsafe impl Send for BatteryReport {}
unsafe impl Sync for BatteryReport {}
windows_core::imp::define_interface!(IBattery, IBattery_Vtbl, 0xbc894fc6_0072_47c8_8b5d_614aaa7a437e);
impl windows_core::RuntimeType for IBattery {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IBattery_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReportUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveReportUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IBatteryReport, IBatteryReport_Vtbl, 0xc9858c3a_4e13_420a_a8d0_24f18f395401);
impl windows_core::RuntimeType for IBatteryReport {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IBatteryReport_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ChargeRateInMilliwatts: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DesignCapacityInMilliwattHours: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FullChargeCapacityInMilliwattHours: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemainingCapacityInMilliwattHours: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "System_Power")]
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::System::Power::BatteryStatus) -> windows_core::HRESULT,
#[cfg(not(feature = "System_Power"))]
Status: usize,
}
windows_core::imp::define_interface!(IBatteryStatics, IBatteryStatics_Vtbl, 0x79cd72b6_9e5e_4452_bea6_dfcd541e597f);
impl windows_core::RuntimeType for IBatteryStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IBatteryStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AggregateBattery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPowerGridData, IPowerGridData_Vtbl, 0xc360fb17_fc92_5f6e_999d_16a4cf9d6c40);
impl windows_core::RuntimeType for IPowerGridData {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPowerGridData_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Severity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub IsLowUserExperienceImpact: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPowerGridForecast, IPowerGridForecast_Vtbl, 0x077e4de9_ed60_58bb_a850_003c6a138685);
impl windows_core::RuntimeType for IPowerGridForecast {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPowerGridForecast_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub StartTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::DateTime) -> windows_core::HRESULT,
pub BlockDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::TimeSpan) -> windows_core::HRESULT,
pub Forecast: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPowerGridForecastStatics, IPowerGridForecastStatics_Vtbl, 0x5b78c806_2e4e_5bcc_bb34_cb81c60f9e12);
impl windows_core::RuntimeType for IPowerGridForecastStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPowerGridForecastStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetForecast: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ForecastUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveForecastUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PowerGridData(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PowerGridData, windows_core::IUnknown, windows_core::IInspectable);
impl PowerGridData {
pub fn Severity(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Severity)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn IsLowUserExperienceImpact(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsLowUserExperienceImpact)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PowerGridData {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPowerGridData>();
}
unsafe impl windows_core::Interface for PowerGridData {
type Vtable = <IPowerGridData as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPowerGridData as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PowerGridData {
const NAME: &'static str = "Windows.Devices.Power.PowerGridData";
}
unsafe impl Send for PowerGridData {}
unsafe impl Sync for PowerGridData {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PowerGridForecast(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PowerGridForecast, windows_core::IUnknown, windows_core::IInspectable);
impl PowerGridForecast {
pub fn StartTime(&self) -> windows_core::Result<super::super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartTime)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn BlockDuration(&self) -> windows_core::Result<super::super::Foundation::TimeSpan> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BlockDuration)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn Forecast(&self) -> windows_core::Result<windows_collections::IVectorView<PowerGridData>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Forecast)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetForecast() -> windows_core::Result<PowerGridForecast> {
Self::IPowerGridForecastStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetForecast)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn ForecastUpdated<P0>(handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::Foundation::EventHandler<windows_core::IInspectable>>,
{
Self::IPowerGridForecastStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ForecastUpdated)(windows_core::Interface::as_raw(this), handler.param().abi(), &mut result__).map(|| result__)
})
}
pub fn RemoveForecastUpdated(token: i64) -> windows_core::Result<()> {
Self::IPowerGridForecastStatics(|this| unsafe { (windows_core::Interface::vtable(this).RemoveForecastUpdated)(windows_core::Interface::as_raw(this), token).ok() })
}
fn IPowerGridForecastStatics<R, F: FnOnce(&IPowerGridForecastStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PowerGridForecast, IPowerGridForecastStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PowerGridForecast {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPowerGridForecast>();
}
unsafe impl windows_core::Interface for PowerGridForecast {
type Vtable = <IPowerGridForecast as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPowerGridForecast as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PowerGridForecast {
const NAME: &'static str = "Windows.Devices.Power.PowerGridForecast";
}
unsafe impl Send for PowerGridForecast {}
unsafe impl Sync for PowerGridForecast {}
@@ -0,0 +1,459 @@
windows_core::imp::define_interface!(IPrint3DWorkflow, IPrint3DWorkflow_Vtbl, 0xc56f74bd_3669_4a66_ab42_c8151930cd34);
impl windows_core::RuntimeType for IPrint3DWorkflow {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrint3DWorkflow_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DeviceID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPrintModelPackage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsPrintReady: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsPrintReady: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub PrintRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePrintRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrint3DWorkflow2, IPrint3DWorkflow2_Vtbl, 0xa2a6c54f_8ac1_4918_9741_e34f3004239e);
impl windows_core::RuntimeType for IPrint3DWorkflow2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrint3DWorkflow2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PrinterChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemovePrinterChanged: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrint3DWorkflowPrintRequestedEventArgs, IPrint3DWorkflowPrintRequestedEventArgs_Vtbl, 0x19f8c858_5ac8_4b55_8a5f_e61567dafb4d);
impl windows_core::RuntimeType for IPrint3DWorkflowPrintRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrint3DWorkflowPrintRequestedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, *mut Print3DWorkflowStatus) -> windows_core::HRESULT,
pub SetExtendedStatus: unsafe extern "system" fn(*mut core::ffi::c_void, Print3DWorkflowDetail) -> windows_core::HRESULT,
pub SetSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetSourceChanged: unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrint3DWorkflowPrinterChangedEventArgs, IPrint3DWorkflowPrinterChangedEventArgs_Vtbl, 0x45226402_95fc_4847_93b3_134dbf5c60f7);
impl windows_core::RuntimeType for IPrint3DWorkflowPrinterChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrint3DWorkflowPrinterChangedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub NewDeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrintExtensionContextStatic, IPrintExtensionContextStatic_Vtbl, 0xe70d9fc1_ff79_4aa4_8c9b_0c93aedfde8a);
impl windows_core::RuntimeType for IPrintExtensionContextStatic {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrintExtensionContextStatic_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub FromDeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrintNotificationEventDetails, IPrintNotificationEventDetails_Vtbl, 0xe00e4c8a_4828_4da1_8bb8_8672df8515e7);
impl windows_core::RuntimeType for IPrintNotificationEventDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrintNotificationEventDetails_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PrinterName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EventData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetEventData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrintTaskConfiguration, IPrintTaskConfiguration_Vtbl, 0xe3c22451_3aa4_4885_9240_311f5f8fbe9d);
impl windows_core::RuntimeType for IPrintTaskConfiguration {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrintTaskConfiguration_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PrinterExtensionContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SaveRequested: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub RemoveSaveRequested: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrintTaskConfigurationSaveRequest, IPrintTaskConfigurationSaveRequest_Vtbl, 0xeeaf2fcb_621e_4b62_ac77_b281cce08d60);
impl windows_core::RuntimeType for IPrintTaskConfigurationSaveRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrintTaskConfigurationSaveRequest_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Save: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeferral: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Deadline: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::DateTime) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrintTaskConfigurationSaveRequestedDeferral, IPrintTaskConfigurationSaveRequestedDeferral_Vtbl, 0xe959d568_f729_44a4_871d_bd0628696a33);
impl windows_core::RuntimeType for IPrintTaskConfigurationSaveRequestedDeferral {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrintTaskConfigurationSaveRequestedDeferral_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Complete: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPrintTaskConfigurationSaveRequestedEventArgs, IPrintTaskConfigurationSaveRequestedEventArgs_Vtbl, 0xe06c2879_0d61_4938_91d0_96a45bee8479);
impl windows_core::RuntimeType for IPrintTaskConfigurationSaveRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPrintTaskConfigurationSaveRequestedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Print3DWorkflow(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(Print3DWorkflow, windows_core::IUnknown, windows_core::IInspectable);
impl Print3DWorkflow {
pub fn DeviceID(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DeviceID)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn GetPrintModelPackage(&self) -> windows_core::Result<windows_core::IInspectable> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetPrintModelPackage)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IsPrintReady(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsPrintReady)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetIsPrintReady(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetIsPrintReady)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn PrintRequested<P0>(&self, eventhandler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<Print3DWorkflow, Print3DWorkflowPrintRequestedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PrintRequested)(windows_core::Interface::as_raw(this), eventhandler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePrintRequested(&self, eventcookie: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemovePrintRequested)(windows_core::Interface::as_raw(this), eventcookie).ok() }
}
pub fn PrinterChanged<P0>(&self, eventhandler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<Print3DWorkflow, Print3DWorkflowPrinterChangedEventArgs>>,
{
let this = &windows_core::Interface::cast::<IPrint3DWorkflow2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PrinterChanged)(windows_core::Interface::as_raw(this), eventhandler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemovePrinterChanged(&self, eventcookie: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IPrint3DWorkflow2>(self)?;
unsafe { (windows_core::Interface::vtable(this).RemovePrinterChanged)(windows_core::Interface::as_raw(this), eventcookie).ok() }
}
}
impl windows_core::RuntimeType for Print3DWorkflow {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrint3DWorkflow>();
}
unsafe impl windows_core::Interface for Print3DWorkflow {
type Vtable = <IPrint3DWorkflow as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrint3DWorkflow as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Print3DWorkflow {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.Print3DWorkflow";
}
unsafe impl Send for Print3DWorkflow {}
unsafe impl Sync for Print3DWorkflow {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct Print3DWorkflowDetail(pub i32);
impl Print3DWorkflowDetail {
pub const Unknown: Self = Self(0i32);
pub const ModelExceedsPrintBed: Self = Self(1i32);
pub const UploadFailed: Self = Self(2i32);
pub const InvalidMaterialSelection: Self = Self(3i32);
pub const InvalidModel: Self = Self(4i32);
pub const ModelNotManifold: Self = Self(5i32);
pub const InvalidPrintTicket: Self = Self(6i32);
}
impl windows_core::TypeKind for Print3DWorkflowDetail {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for Print3DWorkflowDetail {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Printers.Extensions.Print3DWorkflowDetail;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Print3DWorkflowPrintRequestedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(Print3DWorkflowPrintRequestedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl Print3DWorkflowPrintRequestedEventArgs {
pub fn Status(&self) -> windows_core::Result<Print3DWorkflowStatus> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Status)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetExtendedStatus(&self, value: Print3DWorkflowDetail) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetExtendedStatus)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn SetSource<P0>(&self, source: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSource)(windows_core::Interface::as_raw(this), source.param().abi()).ok() }
}
pub fn SetSourceChanged(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetSourceChanged)(windows_core::Interface::as_raw(this), value).ok() }
}
}
impl windows_core::RuntimeType for Print3DWorkflowPrintRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrint3DWorkflowPrintRequestedEventArgs>();
}
unsafe impl windows_core::Interface for Print3DWorkflowPrintRequestedEventArgs {
type Vtable = <IPrint3DWorkflowPrintRequestedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrint3DWorkflowPrintRequestedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Print3DWorkflowPrintRequestedEventArgs {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.Print3DWorkflowPrintRequestedEventArgs";
}
unsafe impl Send for Print3DWorkflowPrintRequestedEventArgs {}
unsafe impl Sync for Print3DWorkflowPrintRequestedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Print3DWorkflowPrinterChangedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(Print3DWorkflowPrinterChangedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl Print3DWorkflowPrinterChangedEventArgs {
pub fn NewDeviceId(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).NewDeviceId)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for Print3DWorkflowPrinterChangedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrint3DWorkflowPrinterChangedEventArgs>();
}
unsafe impl windows_core::Interface for Print3DWorkflowPrinterChangedEventArgs {
type Vtable = <IPrint3DWorkflowPrinterChangedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrint3DWorkflowPrinterChangedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Print3DWorkflowPrinterChangedEventArgs {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.Print3DWorkflowPrinterChangedEventArgs";
}
unsafe impl Send for Print3DWorkflowPrinterChangedEventArgs {}
unsafe impl Sync for Print3DWorkflowPrinterChangedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct Print3DWorkflowStatus(pub i32);
impl Print3DWorkflowStatus {
pub const Abandoned: Self = Self(0i32);
pub const Canceled: Self = Self(1i32);
pub const Failed: Self = Self(2i32);
pub const Slicing: Self = Self(3i32);
pub const Submitted: Self = Self(4i32);
}
impl windows_core::TypeKind for Print3DWorkflowStatus {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for Print3DWorkflowStatus {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Printers.Extensions.Print3DWorkflowStatus;i4)");
}
pub struct PrintExtensionContext;
impl PrintExtensionContext {
pub fn FromDeviceId(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_core::IInspectable> {
Self::IPrintExtensionContextStatic(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromDeviceId)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPrintExtensionContextStatic<R, F: FnOnce(&IPrintExtensionContextStatic) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PrintExtensionContext, IPrintExtensionContextStatic> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeName for PrintExtensionContext {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.PrintExtensionContext";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PrintNotificationEventDetails(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PrintNotificationEventDetails, windows_core::IUnknown, windows_core::IInspectable);
impl PrintNotificationEventDetails {
pub fn PrinterName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PrinterName)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn EventData(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EventData)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub fn SetEventData(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetEventData)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
}
impl windows_core::RuntimeType for PrintNotificationEventDetails {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrintNotificationEventDetails>();
}
unsafe impl windows_core::Interface for PrintNotificationEventDetails {
type Vtable = <IPrintNotificationEventDetails as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrintNotificationEventDetails as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PrintNotificationEventDetails {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.PrintNotificationEventDetails";
}
unsafe impl Send for PrintNotificationEventDetails {}
unsafe impl Sync for PrintNotificationEventDetails {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PrintTaskConfiguration(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PrintTaskConfiguration, windows_core::IUnknown, windows_core::IInspectable);
impl PrintTaskConfiguration {
pub fn PrinterExtensionContext(&self) -> windows_core::Result<windows_core::IInspectable> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PrinterExtensionContext)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SaveRequested<P0>(&self, eventhandler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<super::super::super::Foundation::TypedEventHandler<PrintTaskConfiguration, PrintTaskConfigurationSaveRequestedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SaveRequested)(windows_core::Interface::as_raw(this), eventhandler.param().abi(), &mut result__).map(|| result__)
}
}
pub fn RemoveSaveRequested(&self, eventcookie: i64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).RemoveSaveRequested)(windows_core::Interface::as_raw(this), eventcookie).ok() }
}
}
impl windows_core::RuntimeType for PrintTaskConfiguration {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrintTaskConfiguration>();
}
unsafe impl windows_core::Interface for PrintTaskConfiguration {
type Vtable = <IPrintTaskConfiguration as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrintTaskConfiguration as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PrintTaskConfiguration {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.PrintTaskConfiguration";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PrintTaskConfigurationSaveRequest(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PrintTaskConfigurationSaveRequest, windows_core::IUnknown, windows_core::IInspectable);
impl PrintTaskConfigurationSaveRequest {
pub fn Cancel(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Cancel)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Save<P0>(&self, printerextensioncontext: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = self;
unsafe { (windows_core::Interface::vtable(this).Save)(windows_core::Interface::as_raw(this), printerextensioncontext.param().abi()).ok() }
}
pub fn GetDeferral(&self) -> windows_core::Result<PrintTaskConfigurationSaveRequestedDeferral> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeferral)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Deadline(&self) -> windows_core::Result<super::super::super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Deadline)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PrintTaskConfigurationSaveRequest {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrintTaskConfigurationSaveRequest>();
}
unsafe impl windows_core::Interface for PrintTaskConfigurationSaveRequest {
type Vtable = <IPrintTaskConfigurationSaveRequest as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrintTaskConfigurationSaveRequest as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PrintTaskConfigurationSaveRequest {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequest";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PrintTaskConfigurationSaveRequestedDeferral(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PrintTaskConfigurationSaveRequestedDeferral, windows_core::IUnknown, windows_core::IInspectable);
impl PrintTaskConfigurationSaveRequestedDeferral {
pub fn Complete(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Complete)(windows_core::Interface::as_raw(this)).ok() }
}
}
impl windows_core::RuntimeType for PrintTaskConfigurationSaveRequestedDeferral {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrintTaskConfigurationSaveRequestedDeferral>();
}
unsafe impl windows_core::Interface for PrintTaskConfigurationSaveRequestedDeferral {
type Vtable = <IPrintTaskConfigurationSaveRequestedDeferral as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrintTaskConfigurationSaveRequestedDeferral as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PrintTaskConfigurationSaveRequestedDeferral {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequestedDeferral";
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PrintTaskConfigurationSaveRequestedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PrintTaskConfigurationSaveRequestedEventArgs, windows_core::IUnknown, windows_core::IInspectable);
impl PrintTaskConfigurationSaveRequestedEventArgs {
pub fn Request(&self) -> windows_core::Result<PrintTaskConfigurationSaveRequest> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Request)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for PrintTaskConfigurationSaveRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPrintTaskConfigurationSaveRequestedEventArgs>();
}
unsafe impl windows_core::Interface for PrintTaskConfigurationSaveRequestedEventArgs {
type Vtable = <IPrintTaskConfigurationSaveRequestedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPrintTaskConfigurationSaveRequestedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PrintTaskConfigurationSaveRequestedEventArgs {
const NAME: &'static str = "Windows.Devices.Printers.Extensions.PrintTaskConfigurationSaveRequestedEventArgs";
}
File diff suppressed because it is too large Load Diff
+249
View File
@@ -0,0 +1,249 @@
windows_core::imp::define_interface!(IPwmControllerProvider, IPwmControllerProvider_Vtbl, 0x1300593b_e2e3_40a4_b7d9_48dff0377a52);
impl windows_core::RuntimeType for IPwmControllerProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IPwmControllerProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IPwmControllerProvider {
pub fn PinCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PinCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ActualFrequency(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualFrequency)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDesiredFrequency(&self, frequency: f64) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SetDesiredFrequency)(windows_core::Interface::as_raw(this), frequency, &mut result__).map(|| result__)
}
}
pub fn MaxFrequency(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxFrequency)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MinFrequency(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinFrequency)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn AcquirePin(&self, pin: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).AcquirePin)(windows_core::Interface::as_raw(this), pin).ok() }
}
pub fn ReleasePin(&self, pin: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).ReleasePin)(windows_core::Interface::as_raw(this), pin).ok() }
}
pub fn EnablePin(&self, pin: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).EnablePin)(windows_core::Interface::as_raw(this), pin).ok() }
}
pub fn DisablePin(&self, pin: i32) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).DisablePin)(windows_core::Interface::as_raw(this), pin).ok() }
}
pub fn SetPulseParameters(&self, pin: i32, dutycycle: f64, invertpolarity: bool) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPulseParameters)(windows_core::Interface::as_raw(this), pin, dutycycle, invertpolarity).ok() }
}
}
impl windows_core::RuntimeName for IPwmControllerProvider {
const NAME: &'static str = "Windows.Devices.Pwm.Provider.IPwmControllerProvider";
}
pub trait IPwmControllerProvider_Impl: windows_core::IUnknownImpl {
fn PinCount(&self) -> windows_core::Result<i32>;
fn ActualFrequency(&self) -> windows_core::Result<f64>;
fn SetDesiredFrequency(&self, frequency: f64) -> windows_core::Result<f64>;
fn MaxFrequency(&self) -> windows_core::Result<f64>;
fn MinFrequency(&self) -> windows_core::Result<f64>;
fn AcquirePin(&self, pin: i32) -> windows_core::Result<()>;
fn ReleasePin(&self, pin: i32) -> windows_core::Result<()>;
fn EnablePin(&self, pin: i32) -> windows_core::Result<()>;
fn DisablePin(&self, pin: i32) -> windows_core::Result<()>;
fn SetPulseParameters(&self, pin: i32, dutyCycle: f64, invertPolarity: bool) -> windows_core::Result<()>;
}
impl IPwmControllerProvider_Vtbl {
pub const fn new<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn PinCount<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPwmControllerProvider_Impl::PinCount(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ActualFrequency<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPwmControllerProvider_Impl::ActualFrequency(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetDesiredFrequency<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, frequency: f64, result__: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPwmControllerProvider_Impl::SetDesiredFrequency(this, frequency) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn MaxFrequency<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPwmControllerProvider_Impl::MaxFrequency(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn MinFrequency<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPwmControllerProvider_Impl::MinFrequency(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AcquirePin<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pin: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IPwmControllerProvider_Impl::AcquirePin(this, pin).into()
}
}
unsafe extern "system" fn ReleasePin<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pin: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IPwmControllerProvider_Impl::ReleasePin(this, pin).into()
}
}
unsafe extern "system" fn EnablePin<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pin: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IPwmControllerProvider_Impl::EnablePin(this, pin).into()
}
}
unsafe extern "system" fn DisablePin<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pin: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IPwmControllerProvider_Impl::DisablePin(this, pin).into()
}
}
unsafe extern "system" fn SetPulseParameters<Identity: IPwmControllerProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pin: i32, dutycycle: f64, invertpolarity: bool) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IPwmControllerProvider_Impl::SetPulseParameters(this, pin, dutycycle, invertpolarity).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IPwmControllerProvider, OFFSET>(),
PinCount: PinCount::<Identity, OFFSET>,
ActualFrequency: ActualFrequency::<Identity, OFFSET>,
SetDesiredFrequency: SetDesiredFrequency::<Identity, OFFSET>,
MaxFrequency: MaxFrequency::<Identity, OFFSET>,
MinFrequency: MinFrequency::<Identity, OFFSET>,
AcquirePin: AcquirePin::<Identity, OFFSET>,
ReleasePin: ReleasePin::<Identity, OFFSET>,
EnablePin: EnablePin::<Identity, OFFSET>,
DisablePin: DisablePin::<Identity, OFFSET>,
SetPulseParameters: SetPulseParameters::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IPwmControllerProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPwmControllerProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PinCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub ActualFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetDesiredFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, f64, *mut f64) -> windows_core::HRESULT,
pub MaxFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub MinFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub AcquirePin: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub ReleasePin: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub EnablePin: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub DisablePin: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub SetPulseParameters: unsafe extern "system" fn(*mut core::ffi::c_void, i32, f64, bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPwmProvider, IPwmProvider_Vtbl, 0xa3301228_52f1_47b0_9349_66ba43d25902);
impl windows_core::RuntimeType for IPwmProvider {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
windows_core::imp::interface_hierarchy!(IPwmProvider, windows_core::IUnknown, windows_core::IInspectable);
impl IPwmProvider {
pub fn GetControllers(&self) -> windows_core::Result<windows_collections::IVectorView<IPwmControllerProvider>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllers)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IPwmProvider {
const NAME: &'static str = "Windows.Devices.Pwm.Provider.IPwmProvider";
}
pub trait IPwmProvider_Impl: windows_core::IUnknownImpl {
fn GetControllers(&self) -> windows_core::Result<windows_collections::IVectorView<IPwmControllerProvider>>;
}
impl IPwmProvider_Vtbl {
pub const fn new<Identity: IPwmProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetControllers<Identity: IPwmProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPwmProvider_Impl::GetControllers(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IInspectable_Vtbl::new::<Identity, IPwmProvider, OFFSET>(), GetControllers: GetControllers::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IPwmProvider as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPwmProvider_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetControllers: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
+255
View File
@@ -0,0 +1,255 @@
#[cfg(feature = "Devices_Pwm_Provider")]
pub mod Provider;
windows_core::imp::define_interface!(IPwmController, IPwmController_Vtbl, 0xc45f5c85_d2e8_42cf_9bd6_cf5ed029e6a7);
impl windows_core::RuntimeType for IPwmController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPwmController_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub PinCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub ActualFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetDesiredFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, f64, *mut f64) -> windows_core::HRESULT,
pub MinFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub MaxFrequency: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub OpenPin: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPwmControllerStatics, IPwmControllerStatics_Vtbl, 0x4263bda1_8946_4404_bd48_81dd124af4d9);
impl windows_core::RuntimeType for IPwmControllerStatics {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPwmControllerStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "Devices_Pwm_Provider")]
pub GetControllersAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Devices_Pwm_Provider"))]
GetControllersAsync: usize,
}
windows_core::imp::define_interface!(IPwmControllerStatics2, IPwmControllerStatics2_Vtbl, 0x44fc5b1f_f119_4bdd_97ad_f76ef986736d);
impl windows_core::RuntimeType for IPwmControllerStatics2 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPwmControllerStatics2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDefaultAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPwmControllerStatics3, IPwmControllerStatics3_Vtbl, 0xb2581871_0229_4344_ae3f_9b7cd0e66b94);
impl windows_core::RuntimeType for IPwmControllerStatics3 {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPwmControllerStatics3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub GetDeviceSelector: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceSelectorFromFriendlyName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FromIdAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(IPwmPin, IPwmPin_Vtbl, 0x22972dc8_c6cf_4821_b7f9_c6454fb6af79);
impl windows_core::RuntimeType for IPwmPin {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[repr(C)]
#[doc(hidden)]
pub struct IPwmPin_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Controller: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetActiveDutyCyclePercentage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetActiveDutyCyclePercentage: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub Polarity: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PwmPulsePolarity) -> windows_core::HRESULT,
pub SetPolarity: unsafe extern "system" fn(*mut core::ffi::c_void, PwmPulsePolarity) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsStarted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PwmController(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PwmController, windows_core::IUnknown, windows_core::IInspectable);
impl PwmController {
pub fn PinCount(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PinCount)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn ActualFrequency(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualFrequency)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetDesiredFrequency(&self, desiredfrequency: f64) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SetDesiredFrequency)(windows_core::Interface::as_raw(this), desiredfrequency, &mut result__).map(|| result__)
}
}
pub fn MinFrequency(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinFrequency)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn MaxFrequency(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxFrequency)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn OpenPin(&self, pinnumber: i32) -> windows_core::Result<PwmPin> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenPin)(windows_core::Interface::as_raw(this), pinnumber, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Devices_Pwm_Provider")]
pub fn GetControllersAsync<P0>(provider: P0) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<PwmController>>>
where
P0: windows_core::Param<Provider::IPwmProvider>,
{
Self::IPwmControllerStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetControllersAsync)(windows_core::Interface::as_raw(this), provider.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDefaultAsync() -> windows_core::Result<windows_future::IAsyncOperation<PwmController>> {
Self::IPwmControllerStatics2(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDefaultAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn GetDeviceSelector() -> windows_core::Result<windows_core::HSTRING> {
Self::IPwmControllerStatics3(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelector)(windows_core::Interface::as_raw(this), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn GetDeviceSelectorFromFriendlyName(friendlyname: &windows_core::HSTRING) -> windows_core::Result<windows_core::HSTRING> {
Self::IPwmControllerStatics3(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetDeviceSelectorFromFriendlyName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(friendlyname), &mut result__).map(|| core::mem::transmute(result__))
})
}
pub fn FromIdAsync(deviceid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<PwmController>> {
Self::IPwmControllerStatics3(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FromIdAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(deviceid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IPwmControllerStatics<R, F: FnOnce(&IPwmControllerStatics) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PwmController, IPwmControllerStatics> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IPwmControllerStatics2<R, F: FnOnce(&IPwmControllerStatics2) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PwmController, IPwmControllerStatics2> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IPwmControllerStatics3<R, F: FnOnce(&IPwmControllerStatics3) -> windows_core::Result<R>>(callback: F) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<PwmController, IPwmControllerStatics3> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for PwmController {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPwmController>();
}
unsafe impl windows_core::Interface for PwmController {
type Vtable = <IPwmController as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPwmController as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PwmController {
const NAME: &'static str = "Windows.Devices.Pwm.PwmController";
}
unsafe impl Send for PwmController {}
unsafe impl Sync for PwmController {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PwmPin(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(PwmPin, windows_core::IUnknown, windows_core::IInspectable);
windows_core::imp::required_hierarchy!(PwmPin, super::super::Foundation::IClosable);
impl PwmPin {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<super::super::Foundation::IClosable>(self)?;
unsafe { (windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Controller(&self) -> windows_core::Result<PwmController> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Controller)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetActiveDutyCyclePercentage(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetActiveDutyCyclePercentage)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetActiveDutyCyclePercentage(&self, dutycyclepercentage: f64) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetActiveDutyCyclePercentage)(windows_core::Interface::as_raw(this), dutycyclepercentage).ok() }
}
pub fn Polarity(&self) -> windows_core::Result<PwmPulsePolarity> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Polarity)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn SetPolarity(&self, value: PwmPulsePolarity) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPolarity)(windows_core::Interface::as_raw(this), value).ok() }
}
pub fn Start(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Start)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn Stop(&self) -> windows_core::Result<()> {
let this = self;
unsafe { (windows_core::Interface::vtable(this).Stop)(windows_core::Interface::as_raw(this)).ok() }
}
pub fn IsStarted(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsStarted)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
}
impl windows_core::RuntimeType for PwmPin {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<Self, IPwmPin>();
}
unsafe impl windows_core::Interface for PwmPin {
type Vtable = <IPwmPin as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IPwmPin as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for PwmPin {
const NAME: &'static str = "Windows.Devices.Pwm.PwmPin";
}
unsafe impl Send for PwmPin {}
unsafe impl Sync for PwmPin {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PwmPulsePolarity(pub i32);
impl PwmPulsePolarity {
pub const ActiveHigh: Self = Self(0i32);
pub const ActiveLow: Self = Self(1i32);
}
impl windows_core::TypeKind for PwmPulsePolarity {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for PwmPulsePolarity {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Pwm.PwmPulsePolarity;i4)");
}

Some files were not shown because too many files have changed in this diff Show More