#![allow(
non_snake_case,
non_upper_case_globals,
non_camel_case_types,
dead_code,
clippy::all
)]
#[cfg(feature = "UI_Xaml_Controls")]
pub mod Controls;
#[cfg(feature = "UI_Xaml_Input")]
pub mod Input;
#[cfg(feature = "UI_Xaml_Interop")]
pub mod Interop;
#[cfg(feature = "UI_Xaml_Markup")]
pub mod Markup;
#[cfg(feature = "UI_Xaml_Media")]
pub mod Media;
#[cfg(feature = "UI_Xaml_XamlTypeInfo")]
pub mod XamlTypeInfo;
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Application(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
Application,
windows_core::IUnknown,
windows_core::IInspectable
);
impl Application {
pub fn Resources(&self) -> windows_core::Result<ResourceDictionary> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Resources)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetResources<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<ResourceDictionary>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetResources)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn DebugSettings(&self) -> windows_core::Result<DebugSettings> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DebugSettings)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestedTheme(&self) -> windows_core::Result<ApplicationTheme> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RequestedTheme)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRequestedTheme(&self, value: ApplicationTheme) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRequestedTheme)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn FocusVisualKind(&self) -> windows_core::Result<FocusVisualKind> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FocusVisualKind)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetFocusVisualKind(&self, value: FocusVisualKind) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetFocusVisualKind)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn HighContrastAdjustment(
&self,
) -> windows_core::Result<ApplicationHighContrastAdjustment> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HighContrastAdjustment)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetHighContrastAdjustment(
&self,
value: ApplicationHighContrastAdjustment,
) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetHighContrastAdjustment)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn UnhandledException<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<UnhandledExceptionEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UnhandledException)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveUnhandledException(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveUnhandledException)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn Exit(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Exit)(windows_core::Interface::as_raw(this)).ok()
}
}
pub fn ResourceManagerRequested<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<
windows::Foundation::TypedEventHandler<
windows_core::IInspectable,
ResourceManagerRequestedEventArgs,
>,
>,
{
let this = &windows_core::Interface::cast::<IApplication2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ResourceManagerRequested)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveResourceManagerRequested(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IApplication2>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveResourceManagerRequested)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn DispatcherShutdownMode(&self) -> windows_core::Result<DispatcherShutdownMode> {
let this = &windows_core::Interface::cast::<IApplication3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DispatcherShutdownMode)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetDispatcherShutdownMode(
&self,
value: DispatcherShutdownMode,
) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IApplication3>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetDispatcherShutdownMode)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn new() -> windows_core::Result<Application> {
Self::IApplicationFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateInstance)(
windows_core::Interface::as_raw(this),
core::ptr::null_mut(),
&mut core::ptr::null_mut(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn OnLaunched<P0>(&self, args: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<LaunchActivatedEventArgs>,
{
let this = &windows_core::Interface::cast::<IApplicationOverrides>(self)?;
unsafe {
(windows_core::Interface::vtable(this).OnLaunched)(
windows_core::Interface::as_raw(this),
args.param().abi(),
)
.ok()
}
}
pub fn Current() -> windows_core::Result<Application> {
Self::IApplicationStatics(|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__))
})
}
pub fn Start<P0>(callback: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<ApplicationInitializationCallback>,
{
Self::IApplicationStatics(|this| unsafe {
(windows_core::Interface::vtable(this).Start)(
windows_core::Interface::as_raw(this),
callback.param().abi(),
)
.ok()
})
}
pub fn LoadComponent<P0, P1>(component: P0, resourcelocator: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
P1: windows_core::Param<windows::Foundation::Uri>,
{
Self::IApplicationStatics(|this| unsafe {
(windows_core::Interface::vtable(this).LoadComponent)(
windows_core::Interface::as_raw(this),
component.param().abi(),
resourcelocator.param().abi(),
)
.ok()
})
}
fn IApplicationFactory<R, F: FnOnce(&IApplicationFactory) -> windows_core::Result<R>>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<Application, IApplicationFactory> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IApplicationStatics<R, F: FnOnce(&IApplicationStatics) -> windows_core::Result<R>>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<Application, IApplicationStatics> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for Application {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IApplication>();
}
unsafe impl windows_core::Interface for Application {
type Vtable = <IApplication as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IApplication as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Application {
const NAME: &'static str = "Microsoft.UI.Xaml.Application";
}
unsafe impl Send for Application {}
unsafe impl Sync for Application {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ApplicationHighContrastAdjustment(pub u32);
impl ApplicationHighContrastAdjustment {
pub const None: Self = Self(0u32);
pub const Auto: Self = Self(4294967295u32);
}
impl windows_core::TypeKind for ApplicationHighContrastAdjustment {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ApplicationHighContrastAdjustment {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(
b"enum(Microsoft.UI.Xaml.ApplicationHighContrastAdjustment;u4)",
);
}
impl ApplicationHighContrastAdjustment {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for ApplicationHighContrastAdjustment {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for ApplicationHighContrastAdjustment {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for ApplicationHighContrastAdjustment {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for ApplicationHighContrastAdjustment {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for ApplicationHighContrastAdjustment {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
windows_core::imp::define_interface!(
ApplicationInitializationCallback,
ApplicationInitializationCallback_Vtbl,
0xd8eef1c9_1234_56f1_9963_45dd9c80a661
);
impl windows_core::RuntimeType for ApplicationInitializationCallback {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl ApplicationInitializationCallback {
pub fn new<
F: Fn(
windows_core::Ref<ApplicationInitializationCallbackParams>,
) -> windows_core::Result<()>
+ Send
+ 'static,
>(
invoke: F,
) -> Self {
let com = ApplicationInitializationCallbackBox {
vtable: &ApplicationInitializationCallbackBox::<F>::VTABLE,
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke<P0>(&self, p: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<ApplicationInitializationCallbackParams>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Invoke)(
windows_core::Interface::as_raw(this),
p.param().abi(),
)
.ok()
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ApplicationInitializationCallback_Vtbl {
base__: windows_core::IUnknown_Vtbl,
Invoke: unsafe extern "system" fn(
this: *mut core::ffi::c_void,
p: *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
#[repr(C)]
struct ApplicationInitializationCallbackBox<
F: Fn(windows_core::Ref<ApplicationInitializationCallbackParams>) -> windows_core::Result<()>
+ Send
+ 'static,
> {
vtable: *const ApplicationInitializationCallback_Vtbl,
invoke: F,
count: windows_core::imp::RefCount,
}
impl<
F: Fn(
windows_core::Ref<ApplicationInitializationCallbackParams>,
) -> windows_core::Result<()>
+ Send
+ 'static,
> ApplicationInitializationCallbackBox<F>
{
const VTABLE: ApplicationInitializationCallback_Vtbl = ApplicationInitializationCallback_Vtbl {
base__: windows_core::IUnknown_Vtbl {
QueryInterface: Self::QueryInterface,
AddRef: Self::AddRef,
Release: Self::Release,
},
Invoke: Self::Invoke,
};
unsafe extern "system" fn QueryInterface(
this: *mut core::ffi::c_void,
iid: *const windows_core::GUID,
interface: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
if iid.is_null() || interface.is_null() {
return windows_core::HRESULT(-2147467261);
}
*interface = if *iid
== <ApplicationInitializationCallback as windows_core::Interface>::IID
|| *iid == <windows_core::IUnknown as windows_core::Interface>::IID
|| *iid == <windows_core::imp::IAgileObject as windows_core::Interface>::IID
{
&mut (*this).vtable as *mut _ as _
} else if *iid == <windows_core::imp::IMarshal as windows_core::Interface>::IID {
(*this).count.add_ref();
return windows_core::imp::marshaler(
core::mem::transmute(&mut (*this).vtable as *mut _ as *mut core::ffi::c_void),
interface,
);
} else {
core::ptr::null_mut()
};
if (*interface).is_null() {
windows_core::HRESULT(-2147467262)
} else {
(*this).count.add_ref();
windows_core::HRESULT(0)
}
}
}
unsafe extern "system" fn AddRef(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
(*this).count.add_ref()
}
}
unsafe extern "system" fn Release(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
}
unsafe extern "system" fn Invoke(
this: *mut core::ffi::c_void,
p: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self);
(this.invoke)(core::mem::transmute_copy(&p)).into()
}
}
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ApplicationInitializationCallbackParams(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
ApplicationInitializationCallbackParams,
windows_core::IUnknown,
windows_core::IInspectable
);
impl ApplicationInitializationCallbackParams {}
impl windows_core::RuntimeType for ApplicationInitializationCallbackParams {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_class::<
Self,
IApplicationInitializationCallbackParams,
>();
}
unsafe impl windows_core::Interface for ApplicationInitializationCallbackParams {
type Vtable = <IApplicationInitializationCallbackParams as windows_core::Interface>::Vtable;
const IID: windows_core::GUID =
<IApplicationInitializationCallbackParams as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ApplicationInitializationCallbackParams {
const NAME: &'static str = "Microsoft.UI.Xaml.ApplicationInitializationCallbackParams";
}
unsafe impl Send for ApplicationInitializationCallbackParams {}
unsafe impl Sync for ApplicationInitializationCallbackParams {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ApplicationTheme(pub i32);
impl ApplicationTheme {
pub const Light: Self = Self(0i32);
pub const Dark: Self = Self(1i32);
}
impl windows_core::TypeKind for ApplicationTheme {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for ApplicationTheme {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::from_slice(b"enum(Microsoft.UI.Xaml.ApplicationTheme;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DebugSettings(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
DebugSettings,
windows_core::IUnknown,
windows_core::IInspectable
);
impl DebugSettings {
pub fn EnableFrameRateCounter(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EnableFrameRateCounter)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetEnableFrameRateCounter(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetEnableFrameRateCounter)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsBindingTracingEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsBindingTracingEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsBindingTracingEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsBindingTracingEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsTextPerformanceVisualizationEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsTextPerformanceVisualizationEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsTextPerformanceVisualizationEnabled(
&self,
value: bool,
) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsTextPerformanceVisualizationEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn FailFastOnErrors(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FailFastOnErrors)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetFailFastOnErrors(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetFailFastOnErrors)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RemoveBindingFailed(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveBindingFailed)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn IsXamlResourceReferenceTracingEnabled(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IDebugSettings2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsXamlResourceReferenceTracingEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsXamlResourceReferenceTracingEnabled(
&self,
value: bool,
) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDebugSettings2>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsXamlResourceReferenceTracingEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RemoveXamlResourceReferenceFailed(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IDebugSettings2>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveXamlResourceReferenceFailed)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
}
impl windows_core::RuntimeType for DebugSettings {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IDebugSettings>();
}
unsafe impl windows_core::Interface for DebugSettings {
type Vtable = <IDebugSettings as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IDebugSettings as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for DebugSettings {
const NAME: &'static str = "Microsoft.UI.Xaml.DebugSettings";
}
unsafe impl Send for DebugSettings {}
unsafe impl Sync for DebugSettings {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DependencyObject(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
DependencyObject,
windows_core::IUnknown,
windows_core::IInspectable
);
impl DependencyObject {
pub fn Dispatcher(&self) -> windows_core::Result<windows::UI::Core::CoreDispatcher> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Dispatcher)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI_Dispatching")]
pub fn DispatcherQueue(&self) -> windows_core::Result<super::Dispatching::DispatcherQueue> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DispatcherQueue)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn new() -> windows_core::Result<DependencyObject> {
Self::IDependencyObjectFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateInstance)(
windows_core::Interface::as_raw(this),
core::ptr::null_mut(),
&mut core::ptr::null_mut(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IDependencyObjectFactory<
R,
F: FnOnce(&IDependencyObjectFactory) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<DependencyObject, IDependencyObjectFactory> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for DependencyObject {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IDependencyObject>();
}
unsafe impl windows_core::Interface for DependencyObject {
type Vtable = <IDependencyObject as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IDependencyObject as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for DependencyObject {
const NAME: &'static str = "Microsoft.UI.Xaml.DependencyObject";
}
unsafe impl Send for DependencyObject {}
unsafe impl Sync for DependencyObject {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DispatcherShutdownMode(pub i32);
impl DispatcherShutdownMode {
pub const OnLastWindowClose: Self = Self(0i32);
pub const OnExplicitShutdown: Self = Self(1i32);
}
impl windows_core::TypeKind for DispatcherShutdownMode {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for DispatcherShutdownMode {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(
b"enum(Microsoft.UI.Xaml.DispatcherShutdownMode;i4)",
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct FocusVisualKind(pub i32);
impl FocusVisualKind {
pub const DottedLine: Self = Self(0i32);
pub const HighVisibility: Self = Self(1i32);
pub const Reveal: Self = Self(2i32);
}
impl windows_core::TypeKind for FocusVisualKind {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for FocusVisualKind {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::from_slice(b"enum(Microsoft.UI.Xaml.FocusVisualKind;i4)");
}
#[cfg(feature = "UI_Composition")]
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct FrameworkElement(windows_core::IUnknown);
#[cfg(feature = "UI_Composition")]
windows_core::imp::interface_hierarchy!(
FrameworkElement,
windows_core::IUnknown,
windows_core::IInspectable
);
#[cfg(feature = "UI_Composition")]
windows_core::imp::required_hierarchy!(
FrameworkElement,
super::Composition::IAnimationObject,
super::Composition::IVisualElement,
super::Composition::IVisualElement2,
UIElement,
DependencyObject
);
#[cfg(feature = "UI_Composition")]
impl FrameworkElement {
pub fn Dispatcher(&self) -> windows_core::Result<windows::UI::Core::CoreDispatcher> {
let this = &windows_core::Interface::cast::<IDependencyObject>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Dispatcher)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI_Dispatching")]
pub fn DispatcherQueue(&self) -> windows_core::Result<super::Dispatching::DispatcherQueue> {
let this = &windows_core::Interface::cast::<IDependencyObject>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DispatcherQueue)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Resources(&self) -> windows_core::Result<ResourceDictionary> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Resources)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetResources<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<ResourceDictionary>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetResources)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn Tag(&self) -> windows_core::Result<windows_core::IInspectable> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Tag)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetTag<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetTag)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
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 SetLanguage(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetLanguage)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(value),
)
.ok()
}
}
pub fn ActualWidth(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualWidth)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn ActualHeight(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualHeight)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn Width(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Width)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetWidth(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetWidth)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Height(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Height)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetHeight(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetHeight)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn MinWidth(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinWidth)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetMinWidth(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetMinWidth)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn MaxWidth(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxWidth)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetMaxWidth(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetMaxWidth)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn MinHeight(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MinHeight)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetMinHeight(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetMinHeight)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn MaxHeight(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MaxHeight)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetMaxHeight(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetMaxHeight)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn HorizontalAlignment(&self) -> windows_core::Result<HorizontalAlignment> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HorizontalAlignment)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetHorizontalAlignment(&self, value: HorizontalAlignment) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetHorizontalAlignment)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn VerticalAlignment(&self) -> windows_core::Result<VerticalAlignment> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).VerticalAlignment)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetVerticalAlignment(&self, value: VerticalAlignment) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetVerticalAlignment)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
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 BaseUri(&self) -> windows_core::Result<windows::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BaseUri)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DataContext(&self) -> windows_core::Result<windows_core::IInspectable> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DataContext)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetDataContext<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetDataContext)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn AllowFocusOnInteraction(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AllowFocusOnInteraction)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetAllowFocusOnInteraction(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetAllowFocusOnInteraction)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AllowFocusWhenDisabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AllowFocusWhenDisabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetAllowFocusWhenDisabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetAllowFocusWhenDisabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Parent(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Parent)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IsLoaded(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsLoaded)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn Loaded<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<RoutedEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Loaded)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveLoaded(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveLoaded)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn Unloaded<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<RoutedEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Unloaded)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveUnloaded(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveUnloaded)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDataContextChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDataContextChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveSizeChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveSizeChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn LayoutUpdated<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<windows::Foundation::EventHandler<windows_core::IInspectable>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LayoutUpdated)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveLayoutUpdated(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveLayoutUpdated)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn Loading<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<
windows::Foundation::TypedEventHandler<FrameworkElement, windows_core::IInspectable>,
>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Loading)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveLoading(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveLoading)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn ActualThemeChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<
windows::Foundation::TypedEventHandler<FrameworkElement, windows_core::IInspectable>,
>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualThemeChanged)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveActualThemeChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveActualThemeChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveEffectiveViewportChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveEffectiveViewportChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn FindName(
&self,
name: &windows_core::HSTRING,
) -> windows_core::Result<windows_core::IInspectable> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindName)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(name),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn new() -> windows_core::Result<FrameworkElement> {
Self::IFrameworkElementFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateInstance)(
windows_core::Interface::as_raw(this),
core::ptr::null_mut(),
&mut core::ptr::null_mut(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn MeasureOverride(
&self,
availablesize: windows::Foundation::Size,
) -> windows_core::Result<windows::Foundation::Size> {
let this = &windows_core::Interface::cast::<IFrameworkElementOverrides>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MeasureOverride)(
windows_core::Interface::as_raw(this),
availablesize,
&mut result__,
)
.map(|| result__)
}
}
pub fn ArrangeOverride(
&self,
finalsize: windows::Foundation::Size,
) -> windows_core::Result<windows::Foundation::Size> {
let this = &windows_core::Interface::cast::<IFrameworkElementOverrides>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ArrangeOverride)(
windows_core::Interface::as_raw(this),
finalsize,
&mut result__,
)
.map(|| result__)
}
}
pub fn OnApplyTemplate(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IFrameworkElementOverrides>(self)?;
unsafe {
(windows_core::Interface::vtable(this).OnApplyTemplate)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn GoToElementStateCore(
&self,
statename: &windows_core::HSTRING,
usetransitions: bool,
) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IFrameworkElementOverrides>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GoToElementStateCore)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(statename),
usetransitions,
&mut result__,
)
.map(|| result__)
}
}
pub fn InvalidateViewport(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IFrameworkElementProtected>(self)?;
unsafe {
(windows_core::Interface::vtable(this).InvalidateViewport)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn DeferTree<P0>(element: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
Self::IFrameworkElementStatics(|this| unsafe {
(windows_core::Interface::vtable(this).DeferTree)(
windows_core::Interface::as_raw(this),
element.param().abi(),
)
.ok()
})
}
pub fn DesiredSize(&self) -> windows_core::Result<windows::Foundation::Size> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DesiredSize)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn AllowDrop(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AllowDrop)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetAllowDrop(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetAllowDrop)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Opacity(&self) -> windows_core::Result<f64> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Opacity)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetOpacity(&self, value: f64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetOpacity)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RenderTransformOrigin(&self) -> windows_core::Result<windows::Foundation::Point> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RenderTransformOrigin)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRenderTransformOrigin(
&self,
value: windows::Foundation::Point,
) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetRenderTransformOrigin)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsHitTestVisible(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsHitTestVisible)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsHitTestVisible(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsHitTestVisible)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Visibility(&self) -> windows_core::Result<Visibility> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Visibility)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetVisibility(&self, value: Visibility) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetVisibility)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RenderSize(&self) -> windows_core::Result<windows::Foundation::Size> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RenderSize)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn UseLayoutRounding(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UseLayoutRounding)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetUseLayoutRounding(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetUseLayoutRounding)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsTapEnabled(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsTapEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsTapEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsTapEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsDoubleTapEnabled(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsDoubleTapEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsDoubleTapEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsDoubleTapEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn CanDrag(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CanDrag)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetCanDrag(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetCanDrag)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsRightTapEnabled(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsRightTapEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsRightTapEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsRightTapEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsHoldingEnabled(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsHoldingEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsHoldingEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsHoldingEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerCaptures(
&self,
) -> windows_core::Result<windows_collections::IVectorView<Input::Pointer>> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerCaptures)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn CanBeScrollAnchor(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CanBeScrollAnchor)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetCanBeScrollAnchor(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetCanBeScrollAnchor)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn ExitDisplayModeOnAccessKeyInvoked(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ExitDisplayModeOnAccessKeyInvoked)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetExitDisplayModeOnAccessKeyInvoked(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetExitDisplayModeOnAccessKeyInvoked)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsAccessKeyScope(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsAccessKeyScope)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsAccessKeyScope(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsAccessKeyScope)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AccessKeyScopeOwner(&self) -> windows_core::Result<DependencyObject> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccessKeyScopeOwner)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetAccessKeyScopeOwner<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetAccessKeyScopeOwner)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn AccessKey(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccessKey)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn SetAccessKey(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetAccessKey)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(value),
)
.ok()
}
}
pub fn KeyTipHorizontalOffset(&self) -> windows_core::Result<f64> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyTipHorizontalOffset)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetKeyTipHorizontalOffset(&self, value: f64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetKeyTipHorizontalOffset)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn KeyTipVerticalOffset(&self) -> windows_core::Result<f64> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyTipVerticalOffset)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetKeyTipVerticalOffset(&self, value: f64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetKeyTipVerticalOffset)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn KeyTipTarget(&self) -> windows_core::Result<DependencyObject> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyTipTarget)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetKeyTipTarget<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetKeyTipTarget)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn KeyboardAcceleratorPlacementTarget(&self) -> windows_core::Result<DependencyObject> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyboardAcceleratorPlacementTarget)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetKeyboardAcceleratorPlacementTarget<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetKeyboardAcceleratorPlacementTarget)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn Translation(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Translation)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetTranslation(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetTranslation)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Rotation(&self) -> windows_core::Result<f32> {
let this = &windows_core::Interface::cast::<IUIElement>(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 SetRotation(&self, value: f32) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetRotation)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Scale(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Scale)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetScale(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetScale)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn TransformMatrix(&self) -> windows_core::Result<windows_numerics::Matrix4x4> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TransformMatrix)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetTransformMatrix(
&self,
value: windows_numerics::Matrix4x4,
) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetTransformMatrix)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn CenterPoint(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CenterPoint)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetCenterPoint(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetCenterPoint)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RotationAxis(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RotationAxis)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRotationAxis(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetRotationAxis)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn ActualOffset(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualOffset)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn ActualSize(&self) -> windows_core::Result<windows_numerics::Vector2> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualSize)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn XamlRoot(&self) -> windows_core::Result<XamlRoot> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XamlRoot)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXamlRoot<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<XamlRoot>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetXamlRoot)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn RasterizationScale(&self) -> windows_core::Result<f64> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RasterizationScale)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRasterizationScale(&self, value: f64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetRasterizationScale)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn UseSystemFocusVisuals(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UseSystemFocusVisuals)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetUseSystemFocusVisuals(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetUseSystemFocusVisuals)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn XYFocusLeft(&self) -> windows_core::Result<DependencyObject> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusLeft)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusLeft<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusLeft)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn XYFocusRight(&self) -> windows_core::Result<DependencyObject> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusRight)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusRight<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusRight)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn XYFocusUp(&self) -> windows_core::Result<DependencyObject> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusUp)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusUp<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusUp)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn XYFocusDown(&self) -> windows_core::Result<DependencyObject> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusDown)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusDown<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusDown)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn IsTabStop(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsTabStop)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsTabStop(&self, value: bool) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetIsTabStop)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn TabIndex(&self) -> windows_core::Result<i32> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TabIndex)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetTabIndex(&self, value: i32) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetTabIndex)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RemoveKeyUp(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveKeyUp)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveKeyDown(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveKeyDown)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn GotFocus<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<RoutedEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GotFocus)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveGotFocus(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveGotFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn LostFocus<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<RoutedEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LostFocus)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveLostFocus(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveLostFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragStarting(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragStarting)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDropCompleted(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveDropCompleted)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveCharacterReceived(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveCharacterReceived)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragEnter(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragEnter)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragLeave(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragLeave)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragOver(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragOver)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDrop(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveDrop)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerPressed<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerPressed)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerPressed(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerPressed)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerMoved<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerMoved)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerMoved(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerMoved)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerReleased<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerReleased)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerReleased(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerReleased)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerEntered<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerEntered)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerEntered(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerEntered)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerExited<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerExited)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerExited(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerExited)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerCaptureLost<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerCaptureLost)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerCaptureLost(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerCaptureLost)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerCanceled<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerCanceled)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerCanceled(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerCanceled)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerWheelChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerWheelChanged)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerWheelChanged(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerWheelChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveTapped(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveTapped)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDoubleTapped(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveDoubleTapped)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveHolding(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveHolding)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveContextRequested(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveContextRequested)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn ContextCanceled<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<windows::Foundation::TypedEventHandler<UIElement, RoutedEventArgs>>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContextCanceled)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveContextCanceled(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveContextCanceled)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveRightTapped(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveRightTapped)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationStarting(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationStarting)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationInertiaStarting(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationInertiaStarting)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationStarted(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationStarted)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationDelta(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationDelta)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationCompleted(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationCompleted)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveAccessKeyDisplayRequested(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveAccessKeyDisplayRequested)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveAccessKeyDisplayDismissed(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveAccessKeyDisplayDismissed)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveAccessKeyInvoked(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveAccessKeyInvoked)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveProcessKeyboardAccelerators(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveProcessKeyboardAccelerators)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveGettingFocus(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveGettingFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveLosingFocus(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveLosingFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveNoFocusCandidateFound(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveNoFocusCandidateFound)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemovePreviewKeyDown(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePreviewKeyDown)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemovePreviewKeyUp(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemovePreviewKeyUp)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveBringIntoViewRequested(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveBringIntoViewRequested)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn Measure(&self, availablesize: windows::Foundation::Size) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).Measure)(
windows_core::Interface::as_raw(this),
availablesize,
)
.ok()
}
}
pub fn Arrange(&self, finalrect: windows::Foundation::Rect) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).Arrange)(
windows_core::Interface::as_raw(this),
finalrect,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn CapturePointer<P0>(&self, value: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<Input::Pointer>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CapturePointer)(
windows_core::Interface::as_raw(this),
value.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn ReleasePointerCapture<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<Input::Pointer>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).ReleasePointerCapture)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn ReleasePointerCaptures(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).ReleasePointerCaptures)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn InvalidateMeasure(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).InvalidateMeasure)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn InvalidateArrange(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).InvalidateArrange)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn UpdateLayout(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).UpdateLayout)(windows_core::Interface::as_raw(
this,
))
.ok()
}
}
pub fn CancelDirectManipulations(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CancelDirectManipulations)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "UI_Input")]
pub fn StartDragAsync<P0>(
&self,
pointerpoint: P0,
) -> windows_core::Result<
windows_future::IAsyncOperation<
windows::ApplicationModel::DataTransfer::DataPackageOperation,
>,
>
where
P0: windows_core::Param<super::Input::PointerPoint>,
{
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartDragAsync)(
windows_core::Interface::as_raw(this),
pointerpoint.param().abi(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StartBringIntoView(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElement>(self)?;
unsafe {
(windows_core::Interface::vtable(this).StartBringIntoView)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn OnDisconnectVisualChildren(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElementOverrides>(self)?;
unsafe {
(windows_core::Interface::vtable(this).OnDisconnectVisualChildren)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn FindSubElementsForTouchTargeting(
&self,
point: windows::Foundation::Point,
boundingrect: windows::Foundation::Rect,
) -> windows_core::Result<
windows_collections::IIterable<windows_collections::IIterable<windows::Foundation::Point>>,
> {
let this = &windows_core::Interface::cast::<IUIElementOverrides>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindSubElementsForTouchTargeting)(
windows_core::Interface::as_raw(this),
point,
boundingrect,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetChildrenInTabFocusOrder(
&self,
) -> windows_core::Result<windows_collections::IIterable<DependencyObject>> {
let this = &windows_core::Interface::cast::<IUIElementOverrides>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetChildrenInTabFocusOrder)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
fn IFrameworkElementFactory<
R,
F: FnOnce(&IFrameworkElementFactory) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<FrameworkElement, IFrameworkElementFactory> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IFrameworkElementStatics<
R,
F: FnOnce(&IFrameworkElementStatics) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<FrameworkElement, IFrameworkElementStatics> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
#[cfg(feature = "UI_Composition")]
impl windows_core::RuntimeType for FrameworkElement {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IFrameworkElement>();
}
#[cfg(feature = "UI_Composition")]
unsafe impl windows_core::Interface for FrameworkElement {
type Vtable = <IFrameworkElement as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IFrameworkElement as windows_core::Interface>::IID;
}
#[cfg(feature = "UI_Composition")]
impl windows_core::RuntimeName for FrameworkElement {
const NAME: &'static str = "Microsoft.UI.Xaml.FrameworkElement";
}
#[cfg(feature = "UI_Composition")]
unsafe impl Send for FrameworkElement {}
#[cfg(feature = "UI_Composition")]
unsafe impl Sync for FrameworkElement {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct HorizontalAlignment(pub i32);
impl HorizontalAlignment {
pub const Left: Self = Self(0i32);
pub const Center: Self = Self(1i32);
pub const Right: Self = Self(2i32);
pub const Stretch: Self = Self(3i32);
}
impl windows_core::TypeKind for HorizontalAlignment {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for HorizontalAlignment {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(
b"enum(Microsoft.UI.Xaml.HorizontalAlignment;i4)",
);
}
windows_core::imp::define_interface!(
IApplication,
IApplication_Vtbl,
0x06a8f4e7_1146_55af_820d_ebd55643b021
);
impl windows_core::RuntimeType for IApplication {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IApplication {
const NAME: &'static str = "Microsoft.UI.Xaml.IApplication";
}
pub trait IApplication_Impl: windows_core::IUnknownImpl {
fn Resources(&self) -> windows_core::Result<ResourceDictionary>;
fn SetResources(
&self,
value: windows_core::Ref<ResourceDictionary>,
) -> windows_core::Result<()>;
fn DebugSettings(&self) -> windows_core::Result<DebugSettings>;
fn RequestedTheme(&self) -> windows_core::Result<ApplicationTheme>;
fn SetRequestedTheme(&self, value: ApplicationTheme) -> windows_core::Result<()>;
fn FocusVisualKind(&self) -> windows_core::Result<FocusVisualKind>;
fn SetFocusVisualKind(&self, value: FocusVisualKind) -> windows_core::Result<()>;
fn HighContrastAdjustment(&self) -> windows_core::Result<ApplicationHighContrastAdjustment>;
fn SetHighContrastAdjustment(
&self,
value: ApplicationHighContrastAdjustment,
) -> windows_core::Result<()>;
fn UnhandledException(
&self,
handler: windows_core::Ref<UnhandledExceptionEventHandler>,
) -> windows_core::Result<i64>;
fn RemoveUnhandledException(&self, token: i64) -> windows_core::Result<()>;
fn Exit(&self) -> windows_core::Result<()>;
}
impl IApplication_Vtbl {
pub const fn new<Identity: IApplication_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Resources<Identity: IApplication_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 IApplication_Impl::Resources(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 SetResources<Identity: IApplication_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplication_Impl::SetResources(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn DebugSettings<
Identity: IApplication_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 IApplication_Impl::DebugSettings(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 RequestedTheme<
Identity: IApplication_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut ApplicationTheme,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IApplication_Impl::RequestedTheme(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRequestedTheme<
Identity: IApplication_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: ApplicationTheme,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplication_Impl::SetRequestedTheme(this, value).into()
}
}
unsafe extern "system" fn FocusVisualKind<
Identity: IApplication_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut FocusVisualKind,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IApplication_Impl::FocusVisualKind(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetFocusVisualKind<
Identity: IApplication_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: FocusVisualKind,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplication_Impl::SetFocusVisualKind(this, value).into()
}
}
unsafe extern "system" fn HighContrastAdjustment<
Identity: IApplication_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut ApplicationHighContrastAdjustment,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IApplication_Impl::HighContrastAdjustment(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetHighContrastAdjustment<
Identity: IApplication_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: ApplicationHighContrastAdjustment,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplication_Impl::SetHighContrastAdjustment(this, value).into()
}
}
unsafe extern "system" fn UnhandledException<
Identity: IApplication_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 IApplication_Impl::UnhandledException(
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 RemoveUnhandledException<
Identity: IApplication_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);
IApplication_Impl::RemoveUnhandledException(this, token).into()
}
}
unsafe extern "system" fn Exit<Identity: IApplication_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplication_Impl::Exit(this).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IApplication, OFFSET>(),
Resources: Resources::<Identity, OFFSET>,
SetResources: SetResources::<Identity, OFFSET>,
DebugSettings: DebugSettings::<Identity, OFFSET>,
RequestedTheme: RequestedTheme::<Identity, OFFSET>,
SetRequestedTheme: SetRequestedTheme::<Identity, OFFSET>,
FocusVisualKind: FocusVisualKind::<Identity, OFFSET>,
SetFocusVisualKind: SetFocusVisualKind::<Identity, OFFSET>,
HighContrastAdjustment: HighContrastAdjustment::<Identity, OFFSET>,
SetHighContrastAdjustment: SetHighContrastAdjustment::<Identity, OFFSET>,
UnhandledException: UnhandledException::<Identity, OFFSET>,
RemoveUnhandledException: RemoveUnhandledException::<Identity, OFFSET>,
Exit: Exit::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IApplication as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IApplication_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Resources: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetResources: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub DebugSettings: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub RequestedTheme: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut ApplicationTheme,
) -> windows_core::HRESULT,
pub SetRequestedTheme: unsafe extern "system" fn(
*mut core::ffi::c_void,
ApplicationTheme,
) -> windows_core::HRESULT,
pub FocusVisualKind: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut FocusVisualKind,
) -> windows_core::HRESULT,
pub SetFocusVisualKind:
unsafe extern "system" fn(*mut core::ffi::c_void, FocusVisualKind) -> windows_core::HRESULT,
pub HighContrastAdjustment: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut ApplicationHighContrastAdjustment,
) -> windows_core::HRESULT,
pub SetHighContrastAdjustment: unsafe extern "system" fn(
*mut core::ffi::c_void,
ApplicationHighContrastAdjustment,
) -> windows_core::HRESULT,
pub UnhandledException: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveUnhandledException:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Exit: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IApplication2,
IApplication2_Vtbl,
0x469e6d36_2e11_5b06_9e0a_c5eef0cf8f12
);
impl windows_core::RuntimeType for IApplication2 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IApplication2 {
const NAME: &'static str = "Microsoft.UI.Xaml.IApplication2";
}
pub trait IApplication2_Impl: windows_core::IUnknownImpl {
fn ResourceManagerRequested(
&self,
handler: windows_core::Ref<
windows::Foundation::TypedEventHandler<
windows_core::IInspectable,
ResourceManagerRequestedEventArgs,
>,
>,
) -> windows_core::Result<i64>;
fn RemoveResourceManagerRequested(&self, token: i64) -> windows_core::Result<()>;
}
impl IApplication2_Vtbl {
pub const fn new<Identity: IApplication2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ResourceManagerRequested<
Identity: IApplication2_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 IApplication2_Impl::ResourceManagerRequested(
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 RemoveResourceManagerRequested<
Identity: IApplication2_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);
IApplication2_Impl::RemoveResourceManagerRequested(this, token).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IApplication2, OFFSET>(),
ResourceManagerRequested: ResourceManagerRequested::<Identity, OFFSET>,
RemoveResourceManagerRequested: RemoveResourceManagerRequested::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IApplication2 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IApplication2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ResourceManagerRequested: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveResourceManagerRequested:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IApplication3,
IApplication3_Vtbl,
0xbe941595_61fe_5b36_a3d3_962a647d7c6f
);
impl windows_core::RuntimeType for IApplication3 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IApplication3 {
const NAME: &'static str = "Microsoft.UI.Xaml.IApplication3";
}
pub trait IApplication3_Impl: windows_core::IUnknownImpl {
fn DispatcherShutdownMode(&self) -> windows_core::Result<DispatcherShutdownMode>;
fn SetDispatcherShutdownMode(&self, value: DispatcherShutdownMode) -> windows_core::Result<()>;
}
impl IApplication3_Vtbl {
pub const fn new<Identity: IApplication3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn DispatcherShutdownMode<
Identity: IApplication3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut DispatcherShutdownMode,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IApplication3_Impl::DispatcherShutdownMode(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetDispatcherShutdownMode<
Identity: IApplication3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: DispatcherShutdownMode,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplication3_Impl::SetDispatcherShutdownMode(this, value).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IApplication3, OFFSET>(),
DispatcherShutdownMode: DispatcherShutdownMode::<Identity, OFFSET>,
SetDispatcherShutdownMode: SetDispatcherShutdownMode::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IApplication3 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IApplication3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DispatcherShutdownMode: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut DispatcherShutdownMode,
) -> windows_core::HRESULT,
pub SetDispatcherShutdownMode: unsafe extern "system" fn(
*mut core::ffi::c_void,
DispatcherShutdownMode,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IApplicationFactory,
IApplicationFactory_Vtbl,
0x9fd96657_5294_5a65_a1db_4fea143597da
);
impl windows_core::RuntimeType for IApplicationFactory {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IApplicationFactory {
const NAME: &'static str = "Microsoft.UI.Xaml.IApplicationFactory";
}
pub trait IApplicationFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
baseInterface: windows_core::Ref<windows_core::IInspectable>,
innerInterface: windows_core::OutRef<windows_core::IInspectable>,
) -> windows_core::Result<Application>;
}
impl IApplicationFactory_Vtbl {
pub const fn new<Identity: IApplicationFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<
Identity: IApplicationFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
baseinterface: *mut core::ffi::c_void,
innerinterface: *mut *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 IApplicationFactory_Impl::CreateInstance(
this,
core::mem::transmute_copy(&baseinterface),
core::mem::transmute_copy(&innerinterface),
) {
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, IApplicationFactory, OFFSET>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IApplicationFactory as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IApplicationFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IApplicationInitializationCallbackParams,
IApplicationInitializationCallbackParams_Vtbl,
0x1b1906ea_5b7b_5876_81ab_7c2281ac3d20
);
impl windows_core::RuntimeType for IApplicationInitializationCallbackParams {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IApplicationInitializationCallbackParams {
const NAME: &'static str = "Microsoft.UI.Xaml.IApplicationInitializationCallbackParams";
}
pub trait IApplicationInitializationCallbackParams_Impl: windows_core::IUnknownImpl {}
impl IApplicationInitializationCallbackParams_Vtbl {
pub const fn new<
Identity: IApplicationInitializationCallbackParams_Impl,
const OFFSET: isize,
>() -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IApplicationInitializationCallbackParams,
OFFSET,
>(),
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IApplicationInitializationCallbackParams as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IApplicationInitializationCallbackParams_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(
IApplicationOverrides,
IApplicationOverrides_Vtbl,
0xa33e81ef_c665_503b_8827_d27ef1720a06
);
impl windows_core::RuntimeType for IApplicationOverrides {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl IApplicationOverrides {
pub fn OnLaunched<P0>(&self, args: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<LaunchActivatedEventArgs>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).OnLaunched)(
windows_core::Interface::as_raw(this),
args.param().abi(),
)
.ok()
}
}
}
impl windows_core::RuntimeName for IApplicationOverrides {
const NAME: &'static str = "Microsoft.UI.Xaml.IApplicationOverrides";
}
pub trait IApplicationOverrides_Impl: windows_core::IUnknownImpl {
fn OnLaunched(
&self,
args: windows_core::Ref<LaunchActivatedEventArgs>,
) -> windows_core::Result<()>;
}
impl IApplicationOverrides_Vtbl {
pub const fn new<Identity: IApplicationOverrides_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnLaunched<
Identity: IApplicationOverrides_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
args: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplicationOverrides_Impl::OnLaunched(this, core::mem::transmute_copy(&args))
.into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IApplicationOverrides, OFFSET>(
),
OnLaunched: OnLaunched::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IApplicationOverrides as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IApplicationOverrides_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub OnLaunched: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IApplicationStatics,
IApplicationStatics_Vtbl,
0x4e0d09f5_4358_512c_a987_503b52848e95
);
impl windows_core::RuntimeType for IApplicationStatics {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IApplicationStatics {
const NAME: &'static str = "Microsoft.UI.Xaml.IApplicationStatics";
}
pub trait IApplicationStatics_Impl: windows_core::IUnknownImpl {
fn Current(&self) -> windows_core::Result<Application>;
fn Start(
&self,
callback: windows_core::Ref<ApplicationInitializationCallback>,
) -> windows_core::Result<()>;
fn LoadComponent(
&self,
component: windows_core::Ref<windows_core::IInspectable>,
resourceLocator: windows_core::Ref<windows::Foundation::Uri>,
) -> windows_core::Result<()>;
}
impl IApplicationStatics_Vtbl {
pub const fn new<Identity: IApplicationStatics_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Current<
Identity: IApplicationStatics_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 IApplicationStatics_Impl::Current(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 Start<Identity: IApplicationStatics_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplicationStatics_Impl::Start(this, core::mem::transmute_copy(&callback)).into()
}
}
unsafe extern "system" fn LoadComponent<
Identity: IApplicationStatics_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
component: *mut core::ffi::c_void,
resourcelocator: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IApplicationStatics_Impl::LoadComponent(
this,
core::mem::transmute_copy(&component),
core::mem::transmute_copy(&resourcelocator),
)
.into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IApplicationStatics, OFFSET>(),
Current: Current::<Identity, OFFSET>,
Start: Start::<Identity, OFFSET>,
LoadComponent: LoadComponent::<Identity, OFFSET>,
LoadComponentWithResourceLocation: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IApplicationStatics as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IApplicationStatics_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,
pub Start: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub LoadComponent: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
LoadComponentWithResourceLocation: usize,
}
windows_core::imp::define_interface!(
IDebugSettings,
IDebugSettings_Vtbl,
0x4004943b_2509_5476_bba2_3fe05ecf615d
);
impl windows_core::RuntimeType for IDebugSettings {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IDebugSettings {
const NAME: &'static str = "Microsoft.UI.Xaml.IDebugSettings";
}
pub trait IDebugSettings_Impl: windows_core::IUnknownImpl {
fn EnableFrameRateCounter(&self) -> windows_core::Result<bool>;
fn SetEnableFrameRateCounter(&self, value: bool) -> windows_core::Result<()>;
fn IsBindingTracingEnabled(&self) -> windows_core::Result<bool>;
fn SetIsBindingTracingEnabled(&self, value: bool) -> windows_core::Result<()>;
fn IsTextPerformanceVisualizationEnabled(&self) -> windows_core::Result<bool>;
fn SetIsTextPerformanceVisualizationEnabled(&self, value: bool) -> windows_core::Result<()>;
fn FailFastOnErrors(&self) -> windows_core::Result<bool>;
fn SetFailFastOnErrors(&self, value: bool) -> windows_core::Result<()>;
fn RemoveBindingFailed(&self, token: i64) -> windows_core::Result<()>;
}
impl IDebugSettings_Vtbl {
pub const fn new<Identity: IDebugSettings_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn EnableFrameRateCounter<
Identity: IDebugSettings_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 IDebugSettings_Impl::EnableFrameRateCounter(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetEnableFrameRateCounter<
Identity: IDebugSettings_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDebugSettings_Impl::SetEnableFrameRateCounter(this, value).into()
}
}
unsafe extern "system" fn IsBindingTracingEnabled<
Identity: IDebugSettings_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 IDebugSettings_Impl::IsBindingTracingEnabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsBindingTracingEnabled<
Identity: IDebugSettings_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDebugSettings_Impl::SetIsBindingTracingEnabled(this, value).into()
}
}
unsafe extern "system" fn IsTextPerformanceVisualizationEnabled<
Identity: IDebugSettings_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 IDebugSettings_Impl::IsTextPerformanceVisualizationEnabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsTextPerformanceVisualizationEnabled<
Identity: IDebugSettings_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDebugSettings_Impl::SetIsTextPerformanceVisualizationEnabled(this, value).into()
}
}
unsafe extern "system" fn FailFastOnErrors<
Identity: IDebugSettings_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 IDebugSettings_Impl::FailFastOnErrors(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetFailFastOnErrors<
Identity: IDebugSettings_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDebugSettings_Impl::SetFailFastOnErrors(this, value).into()
}
}
unsafe extern "system" fn RemoveBindingFailed<
Identity: IDebugSettings_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);
IDebugSettings_Impl::RemoveBindingFailed(this, token).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IDebugSettings, OFFSET>(),
EnableFrameRateCounter: EnableFrameRateCounter::<Identity, OFFSET>,
SetEnableFrameRateCounter: SetEnableFrameRateCounter::<Identity, OFFSET>,
IsBindingTracingEnabled: IsBindingTracingEnabled::<Identity, OFFSET>,
SetIsBindingTracingEnabled: SetIsBindingTracingEnabled::<Identity, OFFSET>,
IsTextPerformanceVisualizationEnabled: IsTextPerformanceVisualizationEnabled::<
Identity,
OFFSET,
>,
SetIsTextPerformanceVisualizationEnabled: SetIsTextPerformanceVisualizationEnabled::<
Identity,
OFFSET,
>,
FailFastOnErrors: FailFastOnErrors::<Identity, OFFSET>,
SetFailFastOnErrors: SetFailFastOnErrors::<Identity, OFFSET>,
BindingFailed: 0,
RemoveBindingFailed: RemoveBindingFailed::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDebugSettings as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDebugSettings_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub EnableFrameRateCounter:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetEnableFrameRateCounter:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsBindingTracingEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsBindingTracingEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsTextPerformanceVisualizationEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsTextPerformanceVisualizationEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub FailFastOnErrors:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetFailFastOnErrors:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
BindingFailed: usize,
pub RemoveBindingFailed:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IDebugSettings2,
IDebugSettings2_Vtbl,
0x6dfb6f51_d2f8_59c4_8bca_4410929577d0
);
impl windows_core::RuntimeType for IDebugSettings2 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IDebugSettings2 {
const NAME: &'static str = "Microsoft.UI.Xaml.IDebugSettings2";
}
pub trait IDebugSettings2_Impl: windows_core::IUnknownImpl {
fn IsXamlResourceReferenceTracingEnabled(&self) -> windows_core::Result<bool>;
fn SetIsXamlResourceReferenceTracingEnabled(&self, value: bool) -> windows_core::Result<()>;
fn RemoveXamlResourceReferenceFailed(&self, token: i64) -> windows_core::Result<()>;
}
impl IDebugSettings2_Vtbl {
pub const fn new<Identity: IDebugSettings2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsXamlResourceReferenceTracingEnabled<
Identity: IDebugSettings2_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 IDebugSettings2_Impl::IsXamlResourceReferenceTracingEnabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsXamlResourceReferenceTracingEnabled<
Identity: IDebugSettings2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDebugSettings2_Impl::SetIsXamlResourceReferenceTracingEnabled(this, value).into()
}
}
unsafe extern "system" fn RemoveXamlResourceReferenceFailed<
Identity: IDebugSettings2_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);
IDebugSettings2_Impl::RemoveXamlResourceReferenceFailed(this, token).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IDebugSettings2, OFFSET>(),
IsXamlResourceReferenceTracingEnabled: IsXamlResourceReferenceTracingEnabled::<
Identity,
OFFSET,
>,
SetIsXamlResourceReferenceTracingEnabled: SetIsXamlResourceReferenceTracingEnabled::<
Identity,
OFFSET,
>,
XamlResourceReferenceFailed: 0,
RemoveXamlResourceReferenceFailed: RemoveXamlResourceReferenceFailed::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDebugSettings2 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDebugSettings2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsXamlResourceReferenceTracingEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsXamlResourceReferenceTracingEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
XamlResourceReferenceFailed: usize,
pub RemoveXamlResourceReferenceFailed:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IDebugSettings3,
IDebugSettings3_Vtbl,
0x36135bd5_3917_5c8d_a3c6_2fc89a503f26
);
impl windows_core::RuntimeType for IDebugSettings3 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IDebugSettings3 {
const NAME: &'static str = "Microsoft.UI.Xaml.IDebugSettings3";
}
pub trait IDebugSettings3_Impl: windows_core::IUnknownImpl {}
impl IDebugSettings3_Vtbl {
pub const fn new<Identity: IDebugSettings3_Impl, const OFFSET: isize>() -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IDebugSettings3, OFFSET>(),
LayoutCycleTracingLevel: 0,
SetLayoutCycleTracingLevel: 0,
LayoutCycleDebugBreakLevel: 0,
SetLayoutCycleDebugBreakLevel: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDebugSettings3 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDebugSettings3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
LayoutCycleTracingLevel: usize,
SetLayoutCycleTracingLevel: usize,
LayoutCycleDebugBreakLevel: usize,
SetLayoutCycleDebugBreakLevel: usize,
}
windows_core::imp::define_interface!(
IDependencyObject,
IDependencyObject_Vtbl,
0xe7beaee7_160e_50f7_8789_d63463f979fa
);
impl windows_core::RuntimeType for IDependencyObject {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(feature = "UI_Dispatching")]
impl windows_core::RuntimeName for IDependencyObject {
const NAME: &'static str = "Microsoft.UI.Xaml.IDependencyObject";
}
#[cfg(feature = "UI_Dispatching")]
pub trait IDependencyObject_Impl: windows_core::IUnknownImpl {
fn Dispatcher(&self) -> windows_core::Result<windows::UI::Core::CoreDispatcher>;
fn DispatcherQueue(&self) -> windows_core::Result<super::Dispatching::DispatcherQueue>;
}
#[cfg(feature = "UI_Dispatching")]
impl IDependencyObject_Vtbl {
pub const fn new<Identity: IDependencyObject_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Dispatcher<
Identity: IDependencyObject_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 IDependencyObject_Impl::Dispatcher(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 DispatcherQueue<
Identity: IDependencyObject_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 IDependencyObject_Impl::DispatcherQueue(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, IDependencyObject, OFFSET>(),
GetValue: 0,
SetValue: 0,
ClearValue: 0,
ReadLocalValue: 0,
GetAnimationBaseValue: 0,
RegisterPropertyChangedCallback: 0,
UnregisterPropertyChangedCallback: 0,
Dispatcher: Dispatcher::<Identity, OFFSET>,
DispatcherQueue: DispatcherQueue::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDependencyObject as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDependencyObject_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
GetValue: usize,
SetValue: usize,
ClearValue: usize,
ReadLocalValue: usize,
GetAnimationBaseValue: usize,
RegisterPropertyChangedCallback: usize,
UnregisterPropertyChangedCallback: usize,
pub Dispatcher: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(feature = "UI_Dispatching")]
pub DispatcherQueue: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Dispatching"))]
DispatcherQueue: usize,
}
windows_core::imp::define_interface!(
IDependencyObjectFactory,
IDependencyObjectFactory_Vtbl,
0x936b614c_475f_5d7d_b3f7_bf1fbea28126
);
impl windows_core::RuntimeType for IDependencyObjectFactory {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IDependencyObjectFactory {
const NAME: &'static str = "Microsoft.UI.Xaml.IDependencyObjectFactory";
}
pub trait IDependencyObjectFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
baseInterface: windows_core::Ref<windows_core::IInspectable>,
innerInterface: windows_core::OutRef<windows_core::IInspectable>,
) -> windows_core::Result<DependencyObject>;
}
impl IDependencyObjectFactory_Vtbl {
pub const fn new<Identity: IDependencyObjectFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<
Identity: IDependencyObjectFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
baseinterface: *mut core::ffi::c_void,
innerinterface: *mut *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 IDependencyObjectFactory_Impl::CreateInstance(
this,
core::mem::transmute_copy(&baseinterface),
core::mem::transmute_copy(&innerinterface),
) {
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,
IDependencyObjectFactory,
OFFSET,
>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDependencyObjectFactory as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDependencyObjectFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IFrameworkElement,
IFrameworkElement_Vtbl,
0xfe08f13d_dc6a_5495_ad44_c2d8d21863b0
);
impl windows_core::RuntimeType for IFrameworkElement {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(feature = "UI_Composition")]
impl windows_core::RuntimeName for IFrameworkElement {
const NAME: &'static str = "Microsoft.UI.Xaml.IFrameworkElement";
}
#[cfg(feature = "UI_Composition")]
pub trait IFrameworkElement_Impl: windows_core::IUnknownImpl {
fn Resources(&self) -> windows_core::Result<ResourceDictionary>;
fn SetResources(
&self,
value: windows_core::Ref<ResourceDictionary>,
) -> windows_core::Result<()>;
fn Tag(&self) -> windows_core::Result<windows_core::IInspectable>;
fn SetTag(
&self,
value: windows_core::Ref<windows_core::IInspectable>,
) -> windows_core::Result<()>;
fn Language(&self) -> windows_core::Result<windows_core::HSTRING>;
fn SetLanguage(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>;
fn ActualWidth(&self) -> windows_core::Result<f64>;
fn ActualHeight(&self) -> windows_core::Result<f64>;
fn Width(&self) -> windows_core::Result<f64>;
fn SetWidth(&self, value: f64) -> windows_core::Result<()>;
fn Height(&self) -> windows_core::Result<f64>;
fn SetHeight(&self, value: f64) -> windows_core::Result<()>;
fn MinWidth(&self) -> windows_core::Result<f64>;
fn SetMinWidth(&self, value: f64) -> windows_core::Result<()>;
fn MaxWidth(&self) -> windows_core::Result<f64>;
fn SetMaxWidth(&self, value: f64) -> windows_core::Result<()>;
fn MinHeight(&self) -> windows_core::Result<f64>;
fn SetMinHeight(&self, value: f64) -> windows_core::Result<()>;
fn MaxHeight(&self) -> windows_core::Result<f64>;
fn SetMaxHeight(&self, value: f64) -> windows_core::Result<()>;
fn HorizontalAlignment(&self) -> windows_core::Result<HorizontalAlignment>;
fn SetHorizontalAlignment(&self, value: HorizontalAlignment) -> windows_core::Result<()>;
fn VerticalAlignment(&self) -> windows_core::Result<VerticalAlignment>;
fn SetVerticalAlignment(&self, value: VerticalAlignment) -> windows_core::Result<()>;
fn Name(&self) -> windows_core::Result<windows_core::HSTRING>;
fn SetName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>;
fn BaseUri(&self) -> windows_core::Result<windows::Foundation::Uri>;
fn DataContext(&self) -> windows_core::Result<windows_core::IInspectable>;
fn SetDataContext(
&self,
value: windows_core::Ref<windows_core::IInspectable>,
) -> windows_core::Result<()>;
fn AllowFocusOnInteraction(&self) -> windows_core::Result<bool>;
fn SetAllowFocusOnInteraction(&self, value: bool) -> windows_core::Result<()>;
fn AllowFocusWhenDisabled(&self) -> windows_core::Result<bool>;
fn SetAllowFocusWhenDisabled(&self, value: bool) -> windows_core::Result<()>;
fn Parent(&self) -> windows_core::Result<DependencyObject>;
fn IsLoaded(&self) -> windows_core::Result<bool>;
fn Loaded(&self, handler: windows_core::Ref<RoutedEventHandler>) -> windows_core::Result<i64>;
fn RemoveLoaded(&self, token: i64) -> windows_core::Result<()>;
fn Unloaded(&self, handler: windows_core::Ref<RoutedEventHandler>)
-> windows_core::Result<i64>;
fn RemoveUnloaded(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDataContextChanged(&self, token: i64) -> windows_core::Result<()>;
fn RemoveSizeChanged(&self, token: i64) -> windows_core::Result<()>;
fn LayoutUpdated(
&self,
handler: windows_core::Ref<windows::Foundation::EventHandler<windows_core::IInspectable>>,
) -> windows_core::Result<i64>;
fn RemoveLayoutUpdated(&self, token: i64) -> windows_core::Result<()>;
fn Loading(
&self,
handler: windows_core::Ref<
windows::Foundation::TypedEventHandler<FrameworkElement, windows_core::IInspectable>,
>,
) -> windows_core::Result<i64>;
fn RemoveLoading(&self, token: i64) -> windows_core::Result<()>;
fn ActualThemeChanged(
&self,
handler: windows_core::Ref<
windows::Foundation::TypedEventHandler<FrameworkElement, windows_core::IInspectable>,
>,
) -> windows_core::Result<i64>;
fn RemoveActualThemeChanged(&self, token: i64) -> windows_core::Result<()>;
fn RemoveEffectiveViewportChanged(&self, token: i64) -> windows_core::Result<()>;
fn FindName(
&self,
name: &windows_core::HSTRING,
) -> windows_core::Result<windows_core::IInspectable>;
}
#[cfg(feature = "UI_Composition")]
impl IFrameworkElement_Vtbl {
pub const fn new<Identity: IFrameworkElement_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Resources<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::Resources(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 SetResources<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetResources(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn Tag<Identity: IFrameworkElement_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 IFrameworkElement_Impl::Tag(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 SetTag<Identity: IFrameworkElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetTag(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn Language<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::Language(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 SetLanguage<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetLanguage(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn ActualWidth<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::ActualWidth(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ActualHeight<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::ActualHeight(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Width<Identity: IFrameworkElement_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 IFrameworkElement_Impl::Width(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetWidth<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetWidth(this, value).into()
}
}
unsafe extern "system" fn Height<Identity: IFrameworkElement_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 IFrameworkElement_Impl::Height(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetHeight<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetHeight(this, value).into()
}
}
unsafe extern "system" fn MinWidth<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::MinWidth(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMinWidth<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetMinWidth(this, value).into()
}
}
unsafe extern "system" fn MaxWidth<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::MaxWidth(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMaxWidth<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetMaxWidth(this, value).into()
}
}
unsafe extern "system" fn MinHeight<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::MinHeight(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMinHeight<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetMinHeight(this, value).into()
}
}
unsafe extern "system" fn MaxHeight<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::MaxHeight(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMaxHeight<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetMaxHeight(this, value).into()
}
}
unsafe extern "system" fn HorizontalAlignment<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut HorizontalAlignment,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFrameworkElement_Impl::HorizontalAlignment(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetHorizontalAlignment<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: HorizontalAlignment,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetHorizontalAlignment(this, value).into()
}
}
unsafe extern "system" fn VerticalAlignment<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut VerticalAlignment,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFrameworkElement_Impl::VerticalAlignment(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetVerticalAlignment<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: VerticalAlignment,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetVerticalAlignment(this, value).into()
}
}
unsafe extern "system" fn Name<Identity: IFrameworkElement_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 IFrameworkElement_Impl::Name(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 SetName<Identity: IFrameworkElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetName(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn BaseUri<Identity: IFrameworkElement_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 IFrameworkElement_Impl::BaseUri(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 DataContext<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::DataContext(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 SetDataContext<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetDataContext(this, core::mem::transmute_copy(&value))
.into()
}
}
unsafe extern "system" fn AllowFocusOnInteraction<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::AllowFocusOnInteraction(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetAllowFocusOnInteraction<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetAllowFocusOnInteraction(this, value).into()
}
}
unsafe extern "system" fn AllowFocusWhenDisabled<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::AllowFocusWhenDisabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetAllowFocusWhenDisabled<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElement_Impl::SetAllowFocusWhenDisabled(this, value).into()
}
}
unsafe extern "system" fn Parent<Identity: IFrameworkElement_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 IFrameworkElement_Impl::Parent(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 IsLoaded<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::IsLoaded(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Loaded<Identity: IFrameworkElement_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 IFrameworkElement_Impl::Loaded(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 RemoveLoaded<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveLoaded(this, token).into()
}
}
unsafe extern "system" fn Unloaded<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::Unloaded(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 RemoveUnloaded<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveUnloaded(this, token).into()
}
}
unsafe extern "system" fn RemoveDataContextChanged<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveDataContextChanged(this, token).into()
}
}
unsafe extern "system" fn RemoveSizeChanged<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveSizeChanged(this, token).into()
}
}
unsafe extern "system" fn LayoutUpdated<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::LayoutUpdated(
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 RemoveLayoutUpdated<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveLayoutUpdated(this, token).into()
}
}
unsafe extern "system" fn Loading<Identity: IFrameworkElement_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 IFrameworkElement_Impl::Loading(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 RemoveLoading<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveLoading(this, token).into()
}
}
unsafe extern "system" fn ActualThemeChanged<
Identity: IFrameworkElement_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 IFrameworkElement_Impl::ActualThemeChanged(
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 RemoveActualThemeChanged<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveActualThemeChanged(this, token).into()
}
}
unsafe extern "system" fn RemoveEffectiveViewportChanged<
Identity: IFrameworkElement_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);
IFrameworkElement_Impl::RemoveEffectiveViewportChanged(this, token).into()
}
}
unsafe extern "system" fn FindName<
Identity: IFrameworkElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
name: *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 IFrameworkElement_Impl::FindName(this, core::mem::transmute(&name)) {
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, IFrameworkElement, OFFSET>(),
Triggers: 0,
Resources: Resources::<Identity, OFFSET>,
SetResources: SetResources::<Identity, OFFSET>,
Tag: Tag::<Identity, OFFSET>,
SetTag: SetTag::<Identity, OFFSET>,
Language: Language::<Identity, OFFSET>,
SetLanguage: SetLanguage::<Identity, OFFSET>,
ActualWidth: ActualWidth::<Identity, OFFSET>,
ActualHeight: ActualHeight::<Identity, OFFSET>,
Width: Width::<Identity, OFFSET>,
SetWidth: SetWidth::<Identity, OFFSET>,
Height: Height::<Identity, OFFSET>,
SetHeight: SetHeight::<Identity, OFFSET>,
MinWidth: MinWidth::<Identity, OFFSET>,
SetMinWidth: SetMinWidth::<Identity, OFFSET>,
MaxWidth: MaxWidth::<Identity, OFFSET>,
SetMaxWidth: SetMaxWidth::<Identity, OFFSET>,
MinHeight: MinHeight::<Identity, OFFSET>,
SetMinHeight: SetMinHeight::<Identity, OFFSET>,
MaxHeight: MaxHeight::<Identity, OFFSET>,
SetMaxHeight: SetMaxHeight::<Identity, OFFSET>,
HorizontalAlignment: HorizontalAlignment::<Identity, OFFSET>,
SetHorizontalAlignment: SetHorizontalAlignment::<Identity, OFFSET>,
VerticalAlignment: VerticalAlignment::<Identity, OFFSET>,
SetVerticalAlignment: SetVerticalAlignment::<Identity, OFFSET>,
Margin: 0,
SetMargin: 0,
Name: Name::<Identity, OFFSET>,
SetName: SetName::<Identity, OFFSET>,
BaseUri: BaseUri::<Identity, OFFSET>,
DataContext: DataContext::<Identity, OFFSET>,
SetDataContext: SetDataContext::<Identity, OFFSET>,
AllowFocusOnInteraction: AllowFocusOnInteraction::<Identity, OFFSET>,
SetAllowFocusOnInteraction: SetAllowFocusOnInteraction::<Identity, OFFSET>,
FocusVisualMargin: 0,
SetFocusVisualMargin: 0,
FocusVisualSecondaryThickness: 0,
SetFocusVisualSecondaryThickness: 0,
FocusVisualPrimaryThickness: 0,
SetFocusVisualPrimaryThickness: 0,
FocusVisualSecondaryBrush: 0,
SetFocusVisualSecondaryBrush: 0,
FocusVisualPrimaryBrush: 0,
SetFocusVisualPrimaryBrush: 0,
AllowFocusWhenDisabled: AllowFocusWhenDisabled::<Identity, OFFSET>,
SetAllowFocusWhenDisabled: SetAllowFocusWhenDisabled::<Identity, OFFSET>,
Style: 0,
SetStyle: 0,
Parent: Parent::<Identity, OFFSET>,
FlowDirection: 0,
SetFlowDirection: 0,
RequestedTheme: 0,
SetRequestedTheme: 0,
IsLoaded: IsLoaded::<Identity, OFFSET>,
ActualTheme: 0,
Loaded: Loaded::<Identity, OFFSET>,
RemoveLoaded: RemoveLoaded::<Identity, OFFSET>,
Unloaded: Unloaded::<Identity, OFFSET>,
RemoveUnloaded: RemoveUnloaded::<Identity, OFFSET>,
DataContextChanged: 0,
RemoveDataContextChanged: RemoveDataContextChanged::<Identity, OFFSET>,
SizeChanged: 0,
RemoveSizeChanged: RemoveSizeChanged::<Identity, OFFSET>,
LayoutUpdated: LayoutUpdated::<Identity, OFFSET>,
RemoveLayoutUpdated: RemoveLayoutUpdated::<Identity, OFFSET>,
Loading: Loading::<Identity, OFFSET>,
RemoveLoading: RemoveLoading::<Identity, OFFSET>,
ActualThemeChanged: ActualThemeChanged::<Identity, OFFSET>,
RemoveActualThemeChanged: RemoveActualThemeChanged::<Identity, OFFSET>,
EffectiveViewportChanged: 0,
RemoveEffectiveViewportChanged: RemoveEffectiveViewportChanged::<Identity, OFFSET>,
FindName: FindName::<Identity, OFFSET>,
SetBinding: 0,
GetBindingExpression: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFrameworkElement as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFrameworkElement_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
Triggers: usize,
pub Resources: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetResources: unsafe extern "system" fn(
*mut core::ffi::c_void,
*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 SetTag: unsafe extern "system" fn(
*mut core::ffi::c_void,
*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 SetLanguage: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub ActualWidth:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub ActualHeight:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub Width: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetWidth: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub Height:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetHeight: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub MinWidth:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetMinWidth:
unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub MaxWidth:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetMaxWidth:
unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub MinHeight:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetMinHeight:
unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub MaxHeight:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetMaxHeight:
unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub HorizontalAlignment: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut HorizontalAlignment,
) -> windows_core::HRESULT,
pub SetHorizontalAlignment: unsafe extern "system" fn(
*mut core::ffi::c_void,
HorizontalAlignment,
) -> windows_core::HRESULT,
pub VerticalAlignment: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut VerticalAlignment,
) -> windows_core::HRESULT,
pub SetVerticalAlignment: unsafe extern "system" fn(
*mut core::ffi::c_void,
VerticalAlignment,
) -> windows_core::HRESULT,
Margin: usize,
SetMargin: usize,
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 BaseUri: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub DataContext: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetDataContext: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub AllowFocusOnInteraction:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetAllowFocusOnInteraction:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
FocusVisualMargin: usize,
SetFocusVisualMargin: usize,
FocusVisualSecondaryThickness: usize,
SetFocusVisualSecondaryThickness: usize,
FocusVisualPrimaryThickness: usize,
SetFocusVisualPrimaryThickness: usize,
FocusVisualSecondaryBrush: usize,
SetFocusVisualSecondaryBrush: usize,
FocusVisualPrimaryBrush: usize,
SetFocusVisualPrimaryBrush: usize,
pub AllowFocusWhenDisabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetAllowFocusWhenDisabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
Style: usize,
SetStyle: usize,
pub Parent: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
FlowDirection: usize,
SetFlowDirection: usize,
RequestedTheme: usize,
SetRequestedTheme: usize,
pub IsLoaded:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
ActualTheme: usize,
pub Loaded: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveLoaded:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Unloaded: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveUnloaded:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
DataContextChanged: usize,
pub RemoveDataContextChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
SizeChanged: usize,
pub RemoveSizeChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub LayoutUpdated: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveLayoutUpdated:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Composition")]
pub Loading: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
Loading: usize,
pub RemoveLoading:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Composition")]
pub ActualThemeChanged: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
ActualThemeChanged: usize,
pub RemoveActualThemeChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
EffectiveViewportChanged: usize,
pub RemoveEffectiveViewportChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub FindName: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
SetBinding: usize,
GetBindingExpression: usize,
}
windows_core::imp::define_interface!(
IFrameworkElementFactory,
IFrameworkElementFactory_Vtbl,
0xbd3f2272_3efa_5f92_b759_90b1cc3e784c
);
impl windows_core::RuntimeType for IFrameworkElementFactory {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(feature = "UI_Composition")]
impl windows_core::RuntimeName for IFrameworkElementFactory {
const NAME: &'static str = "Microsoft.UI.Xaml.IFrameworkElementFactory";
}
#[cfg(feature = "UI_Composition")]
pub trait IFrameworkElementFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
baseInterface: windows_core::Ref<windows_core::IInspectable>,
innerInterface: windows_core::OutRef<windows_core::IInspectable>,
) -> windows_core::Result<FrameworkElement>;
}
#[cfg(feature = "UI_Composition")]
impl IFrameworkElementFactory_Vtbl {
pub const fn new<Identity: IFrameworkElementFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<
Identity: IFrameworkElementFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
baseinterface: *mut core::ffi::c_void,
innerinterface: *mut *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 IFrameworkElementFactory_Impl::CreateInstance(
this,
core::mem::transmute_copy(&baseinterface),
core::mem::transmute_copy(&innerinterface),
) {
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,
IFrameworkElementFactory,
OFFSET,
>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFrameworkElementFactory as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFrameworkElementFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "UI_Composition")]
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
CreateInstance: usize,
}
windows_core::imp::define_interface!(
IFrameworkElementOverrides,
IFrameworkElementOverrides_Vtbl,
0xffc6fd98_f38c_5904_9ce4_97a3427cf4ba
);
impl windows_core::RuntimeType for IFrameworkElementOverrides {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl IFrameworkElementOverrides {
pub fn MeasureOverride(
&self,
availablesize: windows::Foundation::Size,
) -> windows_core::Result<windows::Foundation::Size> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MeasureOverride)(
windows_core::Interface::as_raw(this),
availablesize,
&mut result__,
)
.map(|| result__)
}
}
pub fn ArrangeOverride(
&self,
finalsize: windows::Foundation::Size,
) -> windows_core::Result<windows::Foundation::Size> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ArrangeOverride)(
windows_core::Interface::as_raw(this),
finalsize,
&mut result__,
)
.map(|| result__)
}
}
pub fn OnApplyTemplate(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).OnApplyTemplate)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn GoToElementStateCore(
&self,
statename: &windows_core::HSTRING,
usetransitions: bool,
) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GoToElementStateCore)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(statename),
usetransitions,
&mut result__,
)
.map(|| result__)
}
}
}
impl windows_core::RuntimeName for IFrameworkElementOverrides {
const NAME: &'static str = "Microsoft.UI.Xaml.IFrameworkElementOverrides";
}
pub trait IFrameworkElementOverrides_Impl: windows_core::IUnknownImpl {
fn MeasureOverride(
&self,
availableSize: &windows::Foundation::Size,
) -> windows_core::Result<windows::Foundation::Size>;
fn ArrangeOverride(
&self,
finalSize: &windows::Foundation::Size,
) -> windows_core::Result<windows::Foundation::Size>;
fn OnApplyTemplate(&self) -> windows_core::Result<()>;
fn GoToElementStateCore(
&self,
stateName: &windows_core::HSTRING,
useTransitions: bool,
) -> windows_core::Result<bool>;
}
impl IFrameworkElementOverrides_Vtbl {
pub const fn new<Identity: IFrameworkElementOverrides_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn MeasureOverride<
Identity: IFrameworkElementOverrides_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
availablesize: windows::Foundation::Size,
result__: *mut windows::Foundation::Size,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFrameworkElementOverrides_Impl::MeasureOverride(
this,
core::mem::transmute(&availablesize),
) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ArrangeOverride<
Identity: IFrameworkElementOverrides_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
finalsize: windows::Foundation::Size,
result__: *mut windows::Foundation::Size,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFrameworkElementOverrides_Impl::ArrangeOverride(
this,
core::mem::transmute(&finalsize),
) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn OnApplyTemplate<
Identity: IFrameworkElementOverrides_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElementOverrides_Impl::OnApplyTemplate(this).into()
}
}
unsafe extern "system" fn GoToElementStateCore<
Identity: IFrameworkElementOverrides_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
statename: *mut core::ffi::c_void,
usetransitions: bool,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFrameworkElementOverrides_Impl::GoToElementStateCore(
this,
core::mem::transmute(&statename),
usetransitions,
) {
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,
IFrameworkElementOverrides,
OFFSET,
>(),
MeasureOverride: MeasureOverride::<Identity, OFFSET>,
ArrangeOverride: ArrangeOverride::<Identity, OFFSET>,
OnApplyTemplate: OnApplyTemplate::<Identity, OFFSET>,
GoToElementStateCore: GoToElementStateCore::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFrameworkElementOverrides as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFrameworkElementOverrides_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub MeasureOverride: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows::Foundation::Size,
*mut windows::Foundation::Size,
) -> windows_core::HRESULT,
pub ArrangeOverride: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows::Foundation::Size,
*mut windows::Foundation::Size,
) -> windows_core::HRESULT,
pub OnApplyTemplate: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GoToElementStateCore: 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!(
IFrameworkElementProtected,
IFrameworkElementProtected_Vtbl,
0xe59a3db0_91e5_5903_9caf_d1bb9f458bf2
);
impl windows_core::RuntimeType for IFrameworkElementProtected {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IFrameworkElementProtected {
const NAME: &'static str = "Microsoft.UI.Xaml.IFrameworkElementProtected";
}
pub trait IFrameworkElementProtected_Impl: windows_core::IUnknownImpl {
fn InvalidateViewport(&self) -> windows_core::Result<()>;
}
impl IFrameworkElementProtected_Vtbl {
pub const fn new<Identity: IFrameworkElementProtected_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InvalidateViewport<
Identity: IFrameworkElementProtected_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElementProtected_Impl::InvalidateViewport(this).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IFrameworkElementProtected,
OFFSET,
>(),
InvalidateViewport: InvalidateViewport::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFrameworkElementProtected as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFrameworkElementProtected_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub InvalidateViewport:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IFrameworkElementStatics,
IFrameworkElementStatics_Vtbl,
0x894e2704_14e7_569a_b21e_afc7df7145a1
);
impl windows_core::RuntimeType for IFrameworkElementStatics {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IFrameworkElementStatics {
const NAME: &'static str = "Microsoft.UI.Xaml.IFrameworkElementStatics";
}
pub trait IFrameworkElementStatics_Impl: windows_core::IUnknownImpl {
fn DeferTree(&self, element: windows_core::Ref<DependencyObject>) -> windows_core::Result<()>;
}
impl IFrameworkElementStatics_Vtbl {
pub const fn new<Identity: IFrameworkElementStatics_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn DeferTree<
Identity: IFrameworkElementStatics_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
element: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFrameworkElementStatics_Impl::DeferTree(this, core::mem::transmute_copy(&element))
.into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IFrameworkElementStatics,
OFFSET,
>(),
TagProperty: 0,
LanguageProperty: 0,
ActualWidthProperty: 0,
ActualHeightProperty: 0,
WidthProperty: 0,
HeightProperty: 0,
MinWidthProperty: 0,
MaxWidthProperty: 0,
MinHeightProperty: 0,
MaxHeightProperty: 0,
HorizontalAlignmentProperty: 0,
VerticalAlignmentProperty: 0,
MarginProperty: 0,
NameProperty: 0,
DataContextProperty: 0,
AllowFocusOnInteractionProperty: 0,
FocusVisualMarginProperty: 0,
FocusVisualSecondaryThicknessProperty: 0,
FocusVisualPrimaryThicknessProperty: 0,
FocusVisualSecondaryBrushProperty: 0,
FocusVisualPrimaryBrushProperty: 0,
AllowFocusWhenDisabledProperty: 0,
StyleProperty: 0,
FlowDirectionProperty: 0,
RequestedThemeProperty: 0,
ActualThemeProperty: 0,
DeferTree: DeferTree::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFrameworkElementStatics as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFrameworkElementStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
TagProperty: usize,
LanguageProperty: usize,
ActualWidthProperty: usize,
ActualHeightProperty: usize,
WidthProperty: usize,
HeightProperty: usize,
MinWidthProperty: usize,
MaxWidthProperty: usize,
MinHeightProperty: usize,
MaxHeightProperty: usize,
HorizontalAlignmentProperty: usize,
VerticalAlignmentProperty: usize,
MarginProperty: usize,
NameProperty: usize,
DataContextProperty: usize,
AllowFocusOnInteractionProperty: usize,
FocusVisualMarginProperty: usize,
FocusVisualSecondaryThicknessProperty: usize,
FocusVisualPrimaryThicknessProperty: usize,
FocusVisualSecondaryBrushProperty: usize,
FocusVisualPrimaryBrushProperty: usize,
AllowFocusWhenDisabledProperty: usize,
StyleProperty: usize,
FlowDirectionProperty: usize,
RequestedThemeProperty: usize,
ActualThemeProperty: usize,
pub DeferTree: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
ILaunchActivatedEventArgs,
ILaunchActivatedEventArgs_Vtbl,
0xd505cea9_1bcb_5b29_a8be_944e00f06f78
);
impl windows_core::RuntimeType for ILaunchActivatedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for ILaunchActivatedEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.ILaunchActivatedEventArgs";
}
pub trait ILaunchActivatedEventArgs_Impl: windows_core::IUnknownImpl {
fn Arguments(&self) -> windows_core::Result<windows_core::HSTRING>;
fn UWPLaunchActivatedEventArgs(
&self,
) -> windows_core::Result<windows::ApplicationModel::Activation::LaunchActivatedEventArgs>;
}
impl ILaunchActivatedEventArgs_Vtbl {
pub const fn new<Identity: ILaunchActivatedEventArgs_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Arguments<
Identity: ILaunchActivatedEventArgs_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 ILaunchActivatedEventArgs_Impl::Arguments(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 UWPLaunchActivatedEventArgs<
Identity: ILaunchActivatedEventArgs_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 ILaunchActivatedEventArgs_Impl::UWPLaunchActivatedEventArgs(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,
ILaunchActivatedEventArgs,
OFFSET,
>(),
Arguments: Arguments::<Identity, OFFSET>,
UWPLaunchActivatedEventArgs: UWPLaunchActivatedEventArgs::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ILaunchActivatedEventArgs as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ILaunchActivatedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Arguments: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub UWPLaunchActivatedEventArgs: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IResourceDictionary,
IResourceDictionary_Vtbl,
0x1b690975_a710_5783_a6e1_15836f6186c2
);
impl windows_core::RuntimeType for IResourceDictionary {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IResourceDictionary {
const NAME: &'static str = "Microsoft.UI.Xaml.IResourceDictionary";
}
pub trait IResourceDictionary_Impl: windows_core::IUnknownImpl {
fn Source(&self) -> windows_core::Result<windows::Foundation::Uri>;
fn SetSource(
&self,
value: windows_core::Ref<windows::Foundation::Uri>,
) -> windows_core::Result<()>;
fn MergedDictionaries(
&self,
) -> windows_core::Result<windows_collections::IVector<ResourceDictionary>>;
fn ThemeDictionaries(
&self,
) -> windows_core::Result<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
>;
}
impl IResourceDictionary_Vtbl {
pub const fn new<Identity: IResourceDictionary_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Source<
Identity: IResourceDictionary_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 IResourceDictionary_Impl::Source(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 SetSource<
Identity: IResourceDictionary_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IResourceDictionary_Impl::SetSource(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn MergedDictionaries<
Identity: IResourceDictionary_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 IResourceDictionary_Impl::MergedDictionaries(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 ThemeDictionaries<
Identity: IResourceDictionary_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 IResourceDictionary_Impl::ThemeDictionaries(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, IResourceDictionary, OFFSET>(),
Source: Source::<Identity, OFFSET>,
SetSource: SetSource::<Identity, OFFSET>,
MergedDictionaries: MergedDictionaries::<Identity, OFFSET>,
ThemeDictionaries: ThemeDictionaries::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IResourceDictionary as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceDictionary_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Source: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetSource: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub MergedDictionaries: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub ThemeDictionaries: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IResourceDictionaryFactory,
IResourceDictionaryFactory_Vtbl,
0xea22a48f_ab71_56f6_a392_d82310c8aa7b
);
impl windows_core::RuntimeType for IResourceDictionaryFactory {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IResourceDictionaryFactory {
const NAME: &'static str = "Microsoft.UI.Xaml.IResourceDictionaryFactory";
}
pub trait IResourceDictionaryFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
baseInterface: windows_core::Ref<windows_core::IInspectable>,
innerInterface: windows_core::OutRef<windows_core::IInspectable>,
) -> windows_core::Result<ResourceDictionary>;
}
impl IResourceDictionaryFactory_Vtbl {
pub const fn new<Identity: IResourceDictionaryFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<
Identity: IResourceDictionaryFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
baseinterface: *mut core::ffi::c_void,
innerinterface: *mut *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 IResourceDictionaryFactory_Impl::CreateInstance(
this,
core::mem::transmute_copy(&baseinterface),
core::mem::transmute_copy(&innerinterface),
) {
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,
IResourceDictionaryFactory,
OFFSET,
>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IResourceDictionaryFactory as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceDictionaryFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IResourceManagerRequestedEventArgs,
IResourceManagerRequestedEventArgs_Vtbl,
0xc35f4cf1_fcd6_5c6b_9be2_4cfaefb68b2a
);
impl windows_core::RuntimeType for IResourceManagerRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IResourceManagerRequestedEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.IResourceManagerRequestedEventArgs";
}
pub trait IResourceManagerRequestedEventArgs_Impl: windows_core::IUnknownImpl {}
impl IResourceManagerRequestedEventArgs_Vtbl {
pub const fn new<Identity: IResourceManagerRequestedEventArgs_Impl, const OFFSET: isize>(
) -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IResourceManagerRequestedEventArgs,
OFFSET,
>(),
CustomResourceManager: 0,
SetCustomResourceManager: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IResourceManagerRequestedEventArgs as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IResourceManagerRequestedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
CustomResourceManager: usize,
SetCustomResourceManager: usize,
}
windows_core::imp::define_interface!(
IRoutedEventArgs,
IRoutedEventArgs_Vtbl,
0x0908c407_1c7d_5de3_9c50_d971c62ec8ec
);
impl windows_core::RuntimeType for IRoutedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IRoutedEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.IRoutedEventArgs";
}
pub trait IRoutedEventArgs_Impl: windows_core::IUnknownImpl {
fn OriginalSource(&self) -> windows_core::Result<windows_core::IInspectable>;
}
impl IRoutedEventArgs_Vtbl {
pub const fn new<Identity: IRoutedEventArgs_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OriginalSource<
Identity: IRoutedEventArgs_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 IRoutedEventArgs_Impl::OriginalSource(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, IRoutedEventArgs, OFFSET>(),
OriginalSource: OriginalSource::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IRoutedEventArgs as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IRoutedEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub OriginalSource: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IRoutedEventArgsFactory,
IRoutedEventArgsFactory_Vtbl,
0x914b02c7_076b_5b89_98e7_6c373379e9af
);
impl windows_core::RuntimeType for IRoutedEventArgsFactory {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IRoutedEventArgsFactory {
const NAME: &'static str = "Microsoft.UI.Xaml.IRoutedEventArgsFactory";
}
pub trait IRoutedEventArgsFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
baseInterface: windows_core::Ref<windows_core::IInspectable>,
innerInterface: windows_core::OutRef<windows_core::IInspectable>,
) -> windows_core::Result<RoutedEventArgs>;
}
impl IRoutedEventArgsFactory_Vtbl {
pub const fn new<Identity: IRoutedEventArgsFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<
Identity: IRoutedEventArgsFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
baseinterface: *mut core::ffi::c_void,
innerinterface: *mut *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 IRoutedEventArgsFactory_Impl::CreateInstance(
this,
core::mem::transmute_copy(&baseinterface),
core::mem::transmute_copy(&innerinterface),
) {
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, IRoutedEventArgsFactory, OFFSET>(
),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IRoutedEventArgsFactory as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IRoutedEventArgsFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IUIElement,
IUIElement_Vtbl,
0xc3c01020_320c_5cf6_9d24_d396bbfa4d8b
);
impl windows_core::RuntimeType for IUIElement {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(all(
feature = "UI_Composition",
feature = "UI_Input",
feature = "UI_Xaml_Input"
))]
impl windows_core::RuntimeName for IUIElement {
const NAME: &'static str = "Microsoft.UI.Xaml.IUIElement";
}
#[cfg(all(
feature = "UI_Composition",
feature = "UI_Input",
feature = "UI_Xaml_Input"
))]
pub trait IUIElement_Impl: windows_core::IUnknownImpl {
fn DesiredSize(&self) -> windows_core::Result<windows::Foundation::Size>;
fn AllowDrop(&self) -> windows_core::Result<bool>;
fn SetAllowDrop(&self, value: bool) -> windows_core::Result<()>;
fn Opacity(&self) -> windows_core::Result<f64>;
fn SetOpacity(&self, value: f64) -> windows_core::Result<()>;
fn RenderTransformOrigin(&self) -> windows_core::Result<windows::Foundation::Point>;
fn SetRenderTransformOrigin(
&self,
value: &windows::Foundation::Point,
) -> windows_core::Result<()>;
fn IsHitTestVisible(&self) -> windows_core::Result<bool>;
fn SetIsHitTestVisible(&self, value: bool) -> windows_core::Result<()>;
fn Visibility(&self) -> windows_core::Result<Visibility>;
fn SetVisibility(&self, value: Visibility) -> windows_core::Result<()>;
fn RenderSize(&self) -> windows_core::Result<windows::Foundation::Size>;
fn UseLayoutRounding(&self) -> windows_core::Result<bool>;
fn SetUseLayoutRounding(&self, value: bool) -> windows_core::Result<()>;
fn IsTapEnabled(&self) -> windows_core::Result<bool>;
fn SetIsTapEnabled(&self, value: bool) -> windows_core::Result<()>;
fn IsDoubleTapEnabled(&self) -> windows_core::Result<bool>;
fn SetIsDoubleTapEnabled(&self, value: bool) -> windows_core::Result<()>;
fn CanDrag(&self) -> windows_core::Result<bool>;
fn SetCanDrag(&self, value: bool) -> windows_core::Result<()>;
fn IsRightTapEnabled(&self) -> windows_core::Result<bool>;
fn SetIsRightTapEnabled(&self, value: bool) -> windows_core::Result<()>;
fn IsHoldingEnabled(&self) -> windows_core::Result<bool>;
fn SetIsHoldingEnabled(&self, value: bool) -> windows_core::Result<()>;
fn PointerCaptures(
&self,
) -> windows_core::Result<windows_collections::IVectorView<Input::Pointer>>;
fn CanBeScrollAnchor(&self) -> windows_core::Result<bool>;
fn SetCanBeScrollAnchor(&self, value: bool) -> windows_core::Result<()>;
fn ExitDisplayModeOnAccessKeyInvoked(&self) -> windows_core::Result<bool>;
fn SetExitDisplayModeOnAccessKeyInvoked(&self, value: bool) -> windows_core::Result<()>;
fn IsAccessKeyScope(&self) -> windows_core::Result<bool>;
fn SetIsAccessKeyScope(&self, value: bool) -> windows_core::Result<()>;
fn AccessKeyScopeOwner(&self) -> windows_core::Result<DependencyObject>;
fn SetAccessKeyScopeOwner(
&self,
value: windows_core::Ref<DependencyObject>,
) -> windows_core::Result<()>;
fn AccessKey(&self) -> windows_core::Result<windows_core::HSTRING>;
fn SetAccessKey(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>;
fn KeyTipHorizontalOffset(&self) -> windows_core::Result<f64>;
fn SetKeyTipHorizontalOffset(&self, value: f64) -> windows_core::Result<()>;
fn KeyTipVerticalOffset(&self) -> windows_core::Result<f64>;
fn SetKeyTipVerticalOffset(&self, value: f64) -> windows_core::Result<()>;
fn KeyTipTarget(&self) -> windows_core::Result<DependencyObject>;
fn SetKeyTipTarget(
&self,
value: windows_core::Ref<DependencyObject>,
) -> windows_core::Result<()>;
fn KeyboardAcceleratorPlacementTarget(&self) -> windows_core::Result<DependencyObject>;
fn SetKeyboardAcceleratorPlacementTarget(
&self,
value: windows_core::Ref<DependencyObject>,
) -> windows_core::Result<()>;
fn Translation(&self) -> windows_core::Result<windows_numerics::Vector3>;
fn SetTranslation(&self, value: &windows_numerics::Vector3) -> windows_core::Result<()>;
fn Rotation(&self) -> windows_core::Result<f32>;
fn SetRotation(&self, value: f32) -> windows_core::Result<()>;
fn Scale(&self) -> windows_core::Result<windows_numerics::Vector3>;
fn SetScale(&self, value: &windows_numerics::Vector3) -> windows_core::Result<()>;
fn TransformMatrix(&self) -> windows_core::Result<windows_numerics::Matrix4x4>;
fn SetTransformMatrix(&self, value: &windows_numerics::Matrix4x4) -> windows_core::Result<()>;
fn CenterPoint(&self) -> windows_core::Result<windows_numerics::Vector3>;
fn SetCenterPoint(&self, value: &windows_numerics::Vector3) -> windows_core::Result<()>;
fn RotationAxis(&self) -> windows_core::Result<windows_numerics::Vector3>;
fn SetRotationAxis(&self, value: &windows_numerics::Vector3) -> windows_core::Result<()>;
fn ActualOffset(&self) -> windows_core::Result<windows_numerics::Vector3>;
fn ActualSize(&self) -> windows_core::Result<windows_numerics::Vector2>;
fn XamlRoot(&self) -> windows_core::Result<XamlRoot>;
fn SetXamlRoot(&self, value: windows_core::Ref<XamlRoot>) -> windows_core::Result<()>;
fn RasterizationScale(&self) -> windows_core::Result<f64>;
fn SetRasterizationScale(&self, value: f64) -> windows_core::Result<()>;
fn UseSystemFocusVisuals(&self) -> windows_core::Result<bool>;
fn SetUseSystemFocusVisuals(&self, value: bool) -> windows_core::Result<()>;
fn XYFocusLeft(&self) -> windows_core::Result<DependencyObject>;
fn SetXYFocusLeft(
&self,
value: windows_core::Ref<DependencyObject>,
) -> windows_core::Result<()>;
fn XYFocusRight(&self) -> windows_core::Result<DependencyObject>;
fn SetXYFocusRight(
&self,
value: windows_core::Ref<DependencyObject>,
) -> windows_core::Result<()>;
fn XYFocusUp(&self) -> windows_core::Result<DependencyObject>;
fn SetXYFocusUp(&self, value: windows_core::Ref<DependencyObject>) -> windows_core::Result<()>;
fn XYFocusDown(&self) -> windows_core::Result<DependencyObject>;
fn SetXYFocusDown(
&self,
value: windows_core::Ref<DependencyObject>,
) -> windows_core::Result<()>;
fn IsTabStop(&self) -> windows_core::Result<bool>;
fn SetIsTabStop(&self, value: bool) -> windows_core::Result<()>;
fn TabIndex(&self) -> windows_core::Result<i32>;
fn SetTabIndex(&self, value: i32) -> windows_core::Result<()>;
fn RemoveKeyUp(&self, token: i64) -> windows_core::Result<()>;
fn RemoveKeyDown(&self, token: i64) -> windows_core::Result<()>;
fn GotFocus(&self, handler: windows_core::Ref<RoutedEventHandler>)
-> windows_core::Result<i64>;
fn RemoveGotFocus(&self, token: i64) -> windows_core::Result<()>;
fn LostFocus(
&self,
handler: windows_core::Ref<RoutedEventHandler>,
) -> windows_core::Result<i64>;
fn RemoveLostFocus(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDragStarting(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDropCompleted(&self, token: i64) -> windows_core::Result<()>;
fn RemoveCharacterReceived(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDragEnter(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDragLeave(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDragOver(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDrop(&self, token: i64) -> windows_core::Result<()>;
fn PointerPressed(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerPressed(&self, token: i64) -> windows_core::Result<()>;
fn PointerMoved(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerMoved(&self, token: i64) -> windows_core::Result<()>;
fn PointerReleased(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerReleased(&self, token: i64) -> windows_core::Result<()>;
fn PointerEntered(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerEntered(&self, token: i64) -> windows_core::Result<()>;
fn PointerExited(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerExited(&self, token: i64) -> windows_core::Result<()>;
fn PointerCaptureLost(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerCaptureLost(&self, token: i64) -> windows_core::Result<()>;
fn PointerCanceled(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerCanceled(&self, token: i64) -> windows_core::Result<()>;
fn PointerWheelChanged(
&self,
handler: windows_core::Ref<Input::PointerEventHandler>,
) -> windows_core::Result<i64>;
fn RemovePointerWheelChanged(&self, token: i64) -> windows_core::Result<()>;
fn RemoveTapped(&self, token: i64) -> windows_core::Result<()>;
fn RemoveDoubleTapped(&self, token: i64) -> windows_core::Result<()>;
fn RemoveHolding(&self, token: i64) -> windows_core::Result<()>;
fn RemoveContextRequested(&self, token: i64) -> windows_core::Result<()>;
fn ContextCanceled(
&self,
handler: windows_core::Ref<
windows::Foundation::TypedEventHandler<UIElement, RoutedEventArgs>,
>,
) -> windows_core::Result<i64>;
fn RemoveContextCanceled(&self, token: i64) -> windows_core::Result<()>;
fn RemoveRightTapped(&self, token: i64) -> windows_core::Result<()>;
fn RemoveManipulationStarting(&self, token: i64) -> windows_core::Result<()>;
fn RemoveManipulationInertiaStarting(&self, token: i64) -> windows_core::Result<()>;
fn RemoveManipulationStarted(&self, token: i64) -> windows_core::Result<()>;
fn RemoveManipulationDelta(&self, token: i64) -> windows_core::Result<()>;
fn RemoveManipulationCompleted(&self, token: i64) -> windows_core::Result<()>;
fn RemoveAccessKeyDisplayRequested(&self, token: i64) -> windows_core::Result<()>;
fn RemoveAccessKeyDisplayDismissed(&self, token: i64) -> windows_core::Result<()>;
fn RemoveAccessKeyInvoked(&self, token: i64) -> windows_core::Result<()>;
fn RemoveProcessKeyboardAccelerators(&self, token: i64) -> windows_core::Result<()>;
fn RemoveGettingFocus(&self, token: i64) -> windows_core::Result<()>;
fn RemoveLosingFocus(&self, token: i64) -> windows_core::Result<()>;
fn RemoveNoFocusCandidateFound(&self, token: i64) -> windows_core::Result<()>;
fn RemovePreviewKeyDown(&self, token: i64) -> windows_core::Result<()>;
fn RemovePreviewKeyUp(&self, token: i64) -> windows_core::Result<()>;
fn RemoveBringIntoViewRequested(&self, token: i64) -> windows_core::Result<()>;
fn Measure(&self, availableSize: &windows::Foundation::Size) -> windows_core::Result<()>;
fn Arrange(&self, finalRect: &windows::Foundation::Rect) -> windows_core::Result<()>;
fn CapturePointer(
&self,
value: windows_core::Ref<Input::Pointer>,
) -> windows_core::Result<bool>;
fn ReleasePointerCapture(
&self,
value: windows_core::Ref<Input::Pointer>,
) -> windows_core::Result<()>;
fn ReleasePointerCaptures(&self) -> windows_core::Result<()>;
fn InvalidateMeasure(&self) -> windows_core::Result<()>;
fn InvalidateArrange(&self) -> windows_core::Result<()>;
fn UpdateLayout(&self) -> windows_core::Result<()>;
fn CancelDirectManipulations(&self) -> windows_core::Result<bool>;
fn StartDragAsync(
&self,
pointerPoint: windows_core::Ref<super::Input::PointerPoint>,
) -> windows_core::Result<
windows_future::IAsyncOperation<
windows::ApplicationModel::DataTransfer::DataPackageOperation,
>,
>;
fn StartBringIntoView(&self) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "UI_Composition",
feature = "UI_Input",
feature = "UI_Xaml_Input"
))]
impl IUIElement_Vtbl {
pub const fn new<Identity: IUIElement_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn DesiredSize<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows::Foundation::Size,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::DesiredSize(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AllowDrop<Identity: IUIElement_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 IUIElement_Impl::AllowDrop(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetAllowDrop<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetAllowDrop(this, value).into()
}
}
unsafe extern "system" fn Opacity<Identity: IUIElement_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 IUIElement_Impl::Opacity(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetOpacity<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetOpacity(this, value).into()
}
}
unsafe extern "system" fn RenderTransformOrigin<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut windows::Foundation::Point,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::RenderTransformOrigin(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRenderTransformOrigin<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: windows::Foundation::Point,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetRenderTransformOrigin(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn IsHitTestVisible<
Identity: IUIElement_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 IUIElement_Impl::IsHitTestVisible(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsHitTestVisible<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetIsHitTestVisible(this, value).into()
}
}
unsafe extern "system" fn Visibility<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut Visibility,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::Visibility(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetVisibility<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: Visibility,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetVisibility(this, value).into()
}
}
unsafe extern "system" fn RenderSize<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows::Foundation::Size,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::RenderSize(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UseLayoutRounding<
Identity: IUIElement_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 IUIElement_Impl::UseLayoutRounding(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetUseLayoutRounding<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetUseLayoutRounding(this, value).into()
}
}
unsafe extern "system" fn IsTapEnabled<Identity: IUIElement_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 IUIElement_Impl::IsTapEnabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsTapEnabled<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetIsTapEnabled(this, value).into()
}
}
unsafe extern "system" fn IsDoubleTapEnabled<
Identity: IUIElement_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 IUIElement_Impl::IsDoubleTapEnabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsDoubleTapEnabled<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetIsDoubleTapEnabled(this, value).into()
}
}
unsafe extern "system" fn CanDrag<Identity: IUIElement_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 IUIElement_Impl::CanDrag(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCanDrag<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetCanDrag(this, value).into()
}
}
unsafe extern "system" fn IsRightTapEnabled<
Identity: IUIElement_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 IUIElement_Impl::IsRightTapEnabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsRightTapEnabled<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetIsRightTapEnabled(this, value).into()
}
}
unsafe extern "system" fn IsHoldingEnabled<
Identity: IUIElement_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 IUIElement_Impl::IsHoldingEnabled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsHoldingEnabled<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetIsHoldingEnabled(this, value).into()
}
}
unsafe extern "system" fn PointerCaptures<
Identity: IUIElement_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 IUIElement_Impl::PointerCaptures(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 CanBeScrollAnchor<
Identity: IUIElement_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 IUIElement_Impl::CanBeScrollAnchor(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCanBeScrollAnchor<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetCanBeScrollAnchor(this, value).into()
}
}
unsafe extern "system" fn ExitDisplayModeOnAccessKeyInvoked<
Identity: IUIElement_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 IUIElement_Impl::ExitDisplayModeOnAccessKeyInvoked(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetExitDisplayModeOnAccessKeyInvoked<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetExitDisplayModeOnAccessKeyInvoked(this, value).into()
}
}
unsafe extern "system" fn IsAccessKeyScope<
Identity: IUIElement_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 IUIElement_Impl::IsAccessKeyScope(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsAccessKeyScope<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetIsAccessKeyScope(this, value).into()
}
}
unsafe extern "system" fn AccessKeyScopeOwner<
Identity: IUIElement_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 IUIElement_Impl::AccessKeyScopeOwner(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 SetAccessKeyScopeOwner<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetAccessKeyScopeOwner(this, core::mem::transmute_copy(&value))
.into()
}
}
unsafe extern "system" fn AccessKey<Identity: IUIElement_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 IUIElement_Impl::AccessKey(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 SetAccessKey<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetAccessKey(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn KeyTipHorizontalOffset<
Identity: IUIElement_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 IUIElement_Impl::KeyTipHorizontalOffset(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetKeyTipHorizontalOffset<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetKeyTipHorizontalOffset(this, value).into()
}
}
unsafe extern "system" fn KeyTipVerticalOffset<
Identity: IUIElement_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 IUIElement_Impl::KeyTipVerticalOffset(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetKeyTipVerticalOffset<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetKeyTipVerticalOffset(this, value).into()
}
}
unsafe extern "system" fn KeyTipTarget<Identity: IUIElement_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 IUIElement_Impl::KeyTipTarget(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 SetKeyTipTarget<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetKeyTipTarget(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn KeyboardAcceleratorPlacementTarget<
Identity: IUIElement_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 IUIElement_Impl::KeyboardAcceleratorPlacementTarget(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 SetKeyboardAcceleratorPlacementTarget<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetKeyboardAcceleratorPlacementTarget(
this,
core::mem::transmute_copy(&value),
)
.into()
}
}
unsafe extern "system" fn Translation<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::Translation(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetTranslation<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetTranslation(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn Rotation<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut f32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::Rotation(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRotation<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: f32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetRotation(this, value).into()
}
}
unsafe extern "system" fn Scale<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::Scale(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetScale<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetScale(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn TransformMatrix<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut windows_numerics::Matrix4x4,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::TransformMatrix(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetTransformMatrix<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: windows_numerics::Matrix4x4,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetTransformMatrix(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn CenterPoint<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::CenterPoint(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCenterPoint<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetCenterPoint(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn RotationAxis<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::RotationAxis(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRotationAxis<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetRotationAxis(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn ActualOffset<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows_numerics::Vector3,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::ActualOffset(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ActualSize<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows_numerics::Vector2,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElement_Impl::ActualSize(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn XamlRoot<Identity: IUIElement_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 IUIElement_Impl::XamlRoot(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 SetXamlRoot<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetXamlRoot(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn RasterizationScale<
Identity: IUIElement_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 IUIElement_Impl::RasterizationScale(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRasterizationScale<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: f64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetRasterizationScale(this, value).into()
}
}
unsafe extern "system" fn UseSystemFocusVisuals<
Identity: IUIElement_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 IUIElement_Impl::UseSystemFocusVisuals(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetUseSystemFocusVisuals<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetUseSystemFocusVisuals(this, value).into()
}
}
unsafe extern "system" fn XYFocusLeft<Identity: IUIElement_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 IUIElement_Impl::XYFocusLeft(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 SetXYFocusLeft<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetXYFocusLeft(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn XYFocusRight<Identity: IUIElement_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 IUIElement_Impl::XYFocusRight(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 SetXYFocusRight<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetXYFocusRight(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn XYFocusUp<Identity: IUIElement_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 IUIElement_Impl::XYFocusUp(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 SetXYFocusUp<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetXYFocusUp(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn XYFocusDown<Identity: IUIElement_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 IUIElement_Impl::XYFocusDown(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 SetXYFocusDown<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetXYFocusDown(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn IsTabStop<Identity: IUIElement_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 IUIElement_Impl::IsTabStop(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIsTabStop<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetIsTabStop(this, value).into()
}
}
unsafe extern "system" fn TabIndex<Identity: IUIElement_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 IUIElement_Impl::TabIndex(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetTabIndex<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: i32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::SetTabIndex(this, value).into()
}
}
unsafe extern "system" fn RemoveKeyUp<Identity: IUIElement_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);
IUIElement_Impl::RemoveKeyUp(this, token).into()
}
}
unsafe extern "system" fn RemoveKeyDown<Identity: IUIElement_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);
IUIElement_Impl::RemoveKeyDown(this, token).into()
}
}
unsafe extern "system" fn GotFocus<Identity: IUIElement_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 IUIElement_Impl::GotFocus(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 RemoveGotFocus<Identity: IUIElement_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);
IUIElement_Impl::RemoveGotFocus(this, token).into()
}
}
unsafe extern "system" fn LostFocus<Identity: IUIElement_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 IUIElement_Impl::LostFocus(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 RemoveLostFocus<
Identity: IUIElement_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);
IUIElement_Impl::RemoveLostFocus(this, token).into()
}
}
unsafe extern "system" fn RemoveDragStarting<
Identity: IUIElement_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);
IUIElement_Impl::RemoveDragStarting(this, token).into()
}
}
unsafe extern "system" fn RemoveDropCompleted<
Identity: IUIElement_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);
IUIElement_Impl::RemoveDropCompleted(this, token).into()
}
}
unsafe extern "system" fn RemoveCharacterReceived<
Identity: IUIElement_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);
IUIElement_Impl::RemoveCharacterReceived(this, token).into()
}
}
unsafe extern "system" fn RemoveDragEnter<
Identity: IUIElement_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);
IUIElement_Impl::RemoveDragEnter(this, token).into()
}
}
unsafe extern "system" fn RemoveDragLeave<
Identity: IUIElement_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);
IUIElement_Impl::RemoveDragLeave(this, token).into()
}
}
unsafe extern "system" fn RemoveDragOver<Identity: IUIElement_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);
IUIElement_Impl::RemoveDragOver(this, token).into()
}
}
unsafe extern "system" fn RemoveDrop<Identity: IUIElement_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);
IUIElement_Impl::RemoveDrop(this, token).into()
}
}
unsafe extern "system" fn PointerPressed<Identity: IUIElement_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 IUIElement_Impl::PointerPressed(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 RemovePointerPressed<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerPressed(this, token).into()
}
}
unsafe extern "system" fn PointerMoved<Identity: IUIElement_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 IUIElement_Impl::PointerMoved(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 RemovePointerMoved<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerMoved(this, token).into()
}
}
unsafe extern "system" fn PointerReleased<
Identity: IUIElement_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 IUIElement_Impl::PointerReleased(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 RemovePointerReleased<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerReleased(this, token).into()
}
}
unsafe extern "system" fn PointerEntered<Identity: IUIElement_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 IUIElement_Impl::PointerEntered(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 RemovePointerEntered<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerEntered(this, token).into()
}
}
unsafe extern "system" fn PointerExited<Identity: IUIElement_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 IUIElement_Impl::PointerExited(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 RemovePointerExited<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerExited(this, token).into()
}
}
unsafe extern "system" fn PointerCaptureLost<
Identity: IUIElement_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 IUIElement_Impl::PointerCaptureLost(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 RemovePointerCaptureLost<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerCaptureLost(this, token).into()
}
}
unsafe extern "system" fn PointerCanceled<
Identity: IUIElement_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 IUIElement_Impl::PointerCanceled(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 RemovePointerCanceled<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerCanceled(this, token).into()
}
}
unsafe extern "system" fn PointerWheelChanged<
Identity: IUIElement_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 IUIElement_Impl::PointerWheelChanged(
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 RemovePointerWheelChanged<
Identity: IUIElement_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);
IUIElement_Impl::RemovePointerWheelChanged(this, token).into()
}
}
unsafe extern "system" fn RemoveTapped<Identity: IUIElement_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);
IUIElement_Impl::RemoveTapped(this, token).into()
}
}
unsafe extern "system" fn RemoveDoubleTapped<
Identity: IUIElement_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);
IUIElement_Impl::RemoveDoubleTapped(this, token).into()
}
}
unsafe extern "system" fn RemoveHolding<Identity: IUIElement_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);
IUIElement_Impl::RemoveHolding(this, token).into()
}
}
unsafe extern "system" fn RemoveContextRequested<
Identity: IUIElement_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);
IUIElement_Impl::RemoveContextRequested(this, token).into()
}
}
unsafe extern "system" fn ContextCanceled<
Identity: IUIElement_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 IUIElement_Impl::ContextCanceled(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 RemoveContextCanceled<
Identity: IUIElement_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);
IUIElement_Impl::RemoveContextCanceled(this, token).into()
}
}
unsafe extern "system" fn RemoveRightTapped<
Identity: IUIElement_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);
IUIElement_Impl::RemoveRightTapped(this, token).into()
}
}
unsafe extern "system" fn RemoveManipulationStarting<
Identity: IUIElement_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);
IUIElement_Impl::RemoveManipulationStarting(this, token).into()
}
}
unsafe extern "system" fn RemoveManipulationInertiaStarting<
Identity: IUIElement_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);
IUIElement_Impl::RemoveManipulationInertiaStarting(this, token).into()
}
}
unsafe extern "system" fn RemoveManipulationStarted<
Identity: IUIElement_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);
IUIElement_Impl::RemoveManipulationStarted(this, token).into()
}
}
unsafe extern "system" fn RemoveManipulationDelta<
Identity: IUIElement_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);
IUIElement_Impl::RemoveManipulationDelta(this, token).into()
}
}
unsafe extern "system" fn RemoveManipulationCompleted<
Identity: IUIElement_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);
IUIElement_Impl::RemoveManipulationCompleted(this, token).into()
}
}
unsafe extern "system" fn RemoveAccessKeyDisplayRequested<
Identity: IUIElement_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);
IUIElement_Impl::RemoveAccessKeyDisplayRequested(this, token).into()
}
}
unsafe extern "system" fn RemoveAccessKeyDisplayDismissed<
Identity: IUIElement_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);
IUIElement_Impl::RemoveAccessKeyDisplayDismissed(this, token).into()
}
}
unsafe extern "system" fn RemoveAccessKeyInvoked<
Identity: IUIElement_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);
IUIElement_Impl::RemoveAccessKeyInvoked(this, token).into()
}
}
unsafe extern "system" fn RemoveProcessKeyboardAccelerators<
Identity: IUIElement_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);
IUIElement_Impl::RemoveProcessKeyboardAccelerators(this, token).into()
}
}
unsafe extern "system" fn RemoveGettingFocus<
Identity: IUIElement_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);
IUIElement_Impl::RemoveGettingFocus(this, token).into()
}
}
unsafe extern "system" fn RemoveLosingFocus<
Identity: IUIElement_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);
IUIElement_Impl::RemoveLosingFocus(this, token).into()
}
}
unsafe extern "system" fn RemoveNoFocusCandidateFound<
Identity: IUIElement_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);
IUIElement_Impl::RemoveNoFocusCandidateFound(this, token).into()
}
}
unsafe extern "system" fn RemovePreviewKeyDown<
Identity: IUIElement_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);
IUIElement_Impl::RemovePreviewKeyDown(this, token).into()
}
}
unsafe extern "system" fn RemovePreviewKeyUp<
Identity: IUIElement_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);
IUIElement_Impl::RemovePreviewKeyUp(this, token).into()
}
}
unsafe extern "system" fn RemoveBringIntoViewRequested<
Identity: IUIElement_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);
IUIElement_Impl::RemoveBringIntoViewRequested(this, token).into()
}
}
unsafe extern "system" fn Measure<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
availablesize: windows::Foundation::Size,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::Measure(this, core::mem::transmute(&availablesize)).into()
}
}
unsafe extern "system" fn Arrange<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
finalrect: windows::Foundation::Rect,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::Arrange(this, core::mem::transmute(&finalrect)).into()
}
}
unsafe extern "system" fn CapturePointer<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *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 IUIElement_Impl::CapturePointer(this, core::mem::transmute_copy(&value)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ReleasePointerCapture<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::ReleasePointerCapture(this, core::mem::transmute_copy(&value))
.into()
}
}
unsafe extern "system" fn ReleasePointerCaptures<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::ReleasePointerCaptures(this).into()
}
}
unsafe extern "system" fn InvalidateMeasure<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::InvalidateMeasure(this).into()
}
}
unsafe extern "system" fn InvalidateArrange<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::InvalidateArrange(this).into()
}
}
unsafe extern "system" fn UpdateLayout<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::UpdateLayout(this).into()
}
}
unsafe extern "system" fn CancelDirectManipulations<
Identity: IUIElement_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 IUIElement_Impl::CancelDirectManipulations(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn StartDragAsync<Identity: IUIElement_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
pointerpoint: *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 IUIElement_Impl::StartDragAsync(
this,
core::mem::transmute_copy(&pointerpoint),
) {
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 StartBringIntoView<
Identity: IUIElement_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElement_Impl::StartBringIntoView(this).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IUIElement, OFFSET>(),
DesiredSize: DesiredSize::<Identity, OFFSET>,
AllowDrop: AllowDrop::<Identity, OFFSET>,
SetAllowDrop: SetAllowDrop::<Identity, OFFSET>,
Opacity: Opacity::<Identity, OFFSET>,
SetOpacity: SetOpacity::<Identity, OFFSET>,
Clip: 0,
SetClip: 0,
RenderTransform: 0,
SetRenderTransform: 0,
Projection: 0,
SetProjection: 0,
Transform3D: 0,
SetTransform3D: 0,
RenderTransformOrigin: RenderTransformOrigin::<Identity, OFFSET>,
SetRenderTransformOrigin: SetRenderTransformOrigin::<Identity, OFFSET>,
IsHitTestVisible: IsHitTestVisible::<Identity, OFFSET>,
SetIsHitTestVisible: SetIsHitTestVisible::<Identity, OFFSET>,
Visibility: Visibility::<Identity, OFFSET>,
SetVisibility: SetVisibility::<Identity, OFFSET>,
RenderSize: RenderSize::<Identity, OFFSET>,
UseLayoutRounding: UseLayoutRounding::<Identity, OFFSET>,
SetUseLayoutRounding: SetUseLayoutRounding::<Identity, OFFSET>,
Transitions: 0,
SetTransitions: 0,
CacheMode: 0,
SetCacheMode: 0,
IsTapEnabled: IsTapEnabled::<Identity, OFFSET>,
SetIsTapEnabled: SetIsTapEnabled::<Identity, OFFSET>,
IsDoubleTapEnabled: IsDoubleTapEnabled::<Identity, OFFSET>,
SetIsDoubleTapEnabled: SetIsDoubleTapEnabled::<Identity, OFFSET>,
CanDrag: CanDrag::<Identity, OFFSET>,
SetCanDrag: SetCanDrag::<Identity, OFFSET>,
IsRightTapEnabled: IsRightTapEnabled::<Identity, OFFSET>,
SetIsRightTapEnabled: SetIsRightTapEnabled::<Identity, OFFSET>,
IsHoldingEnabled: IsHoldingEnabled::<Identity, OFFSET>,
SetIsHoldingEnabled: SetIsHoldingEnabled::<Identity, OFFSET>,
ManipulationMode: 0,
SetManipulationMode: 0,
PointerCaptures: PointerCaptures::<Identity, OFFSET>,
ContextFlyout: 0,
SetContextFlyout: 0,
CompositeMode: 0,
SetCompositeMode: 0,
Lights: 0,
CanBeScrollAnchor: CanBeScrollAnchor::<Identity, OFFSET>,
SetCanBeScrollAnchor: SetCanBeScrollAnchor::<Identity, OFFSET>,
ExitDisplayModeOnAccessKeyInvoked: ExitDisplayModeOnAccessKeyInvoked::<Identity, OFFSET>,
SetExitDisplayModeOnAccessKeyInvoked: SetExitDisplayModeOnAccessKeyInvoked::<
Identity,
OFFSET,
>,
IsAccessKeyScope: IsAccessKeyScope::<Identity, OFFSET>,
SetIsAccessKeyScope: SetIsAccessKeyScope::<Identity, OFFSET>,
AccessKeyScopeOwner: AccessKeyScopeOwner::<Identity, OFFSET>,
SetAccessKeyScopeOwner: SetAccessKeyScopeOwner::<Identity, OFFSET>,
AccessKey: AccessKey::<Identity, OFFSET>,
SetAccessKey: SetAccessKey::<Identity, OFFSET>,
KeyTipPlacementMode: 0,
SetKeyTipPlacementMode: 0,
KeyTipHorizontalOffset: KeyTipHorizontalOffset::<Identity, OFFSET>,
SetKeyTipHorizontalOffset: SetKeyTipHorizontalOffset::<Identity, OFFSET>,
KeyTipVerticalOffset: KeyTipVerticalOffset::<Identity, OFFSET>,
SetKeyTipVerticalOffset: SetKeyTipVerticalOffset::<Identity, OFFSET>,
KeyTipTarget: KeyTipTarget::<Identity, OFFSET>,
SetKeyTipTarget: SetKeyTipTarget::<Identity, OFFSET>,
XYFocusKeyboardNavigation: 0,
SetXYFocusKeyboardNavigation: 0,
XYFocusUpNavigationStrategy: 0,
SetXYFocusUpNavigationStrategy: 0,
XYFocusDownNavigationStrategy: 0,
SetXYFocusDownNavigationStrategy: 0,
XYFocusLeftNavigationStrategy: 0,
SetXYFocusLeftNavigationStrategy: 0,
XYFocusRightNavigationStrategy: 0,
SetXYFocusRightNavigationStrategy: 0,
KeyboardAccelerators: 0,
KeyboardAcceleratorPlacementTarget: KeyboardAcceleratorPlacementTarget::<
Identity,
OFFSET,
>,
SetKeyboardAcceleratorPlacementTarget: SetKeyboardAcceleratorPlacementTarget::<
Identity,
OFFSET,
>,
KeyboardAcceleratorPlacementMode: 0,
SetKeyboardAcceleratorPlacementMode: 0,
HighContrastAdjustment: 0,
SetHighContrastAdjustment: 0,
TabFocusNavigation: 0,
SetTabFocusNavigation: 0,
OpacityTransition: 0,
SetOpacityTransition: 0,
Translation: Translation::<Identity, OFFSET>,
SetTranslation: SetTranslation::<Identity, OFFSET>,
TranslationTransition: 0,
SetTranslationTransition: 0,
Rotation: Rotation::<Identity, OFFSET>,
SetRotation: SetRotation::<Identity, OFFSET>,
RotationTransition: 0,
SetRotationTransition: 0,
Scale: Scale::<Identity, OFFSET>,
SetScale: SetScale::<Identity, OFFSET>,
ScaleTransition: 0,
SetScaleTransition: 0,
TransformMatrix: TransformMatrix::<Identity, OFFSET>,
SetTransformMatrix: SetTransformMatrix::<Identity, OFFSET>,
CenterPoint: CenterPoint::<Identity, OFFSET>,
SetCenterPoint: SetCenterPoint::<Identity, OFFSET>,
RotationAxis: RotationAxis::<Identity, OFFSET>,
SetRotationAxis: SetRotationAxis::<Identity, OFFSET>,
ActualOffset: ActualOffset::<Identity, OFFSET>,
ActualSize: ActualSize::<Identity, OFFSET>,
XamlRoot: XamlRoot::<Identity, OFFSET>,
SetXamlRoot: SetXamlRoot::<Identity, OFFSET>,
Shadow: 0,
SetShadow: 0,
RasterizationScale: RasterizationScale::<Identity, OFFSET>,
SetRasterizationScale: SetRasterizationScale::<Identity, OFFSET>,
FocusState: 0,
UseSystemFocusVisuals: UseSystemFocusVisuals::<Identity, OFFSET>,
SetUseSystemFocusVisuals: SetUseSystemFocusVisuals::<Identity, OFFSET>,
XYFocusLeft: XYFocusLeft::<Identity, OFFSET>,
SetXYFocusLeft: SetXYFocusLeft::<Identity, OFFSET>,
XYFocusRight: XYFocusRight::<Identity, OFFSET>,
SetXYFocusRight: SetXYFocusRight::<Identity, OFFSET>,
XYFocusUp: XYFocusUp::<Identity, OFFSET>,
SetXYFocusUp: SetXYFocusUp::<Identity, OFFSET>,
XYFocusDown: XYFocusDown::<Identity, OFFSET>,
SetXYFocusDown: SetXYFocusDown::<Identity, OFFSET>,
IsTabStop: IsTabStop::<Identity, OFFSET>,
SetIsTabStop: SetIsTabStop::<Identity, OFFSET>,
TabIndex: TabIndex::<Identity, OFFSET>,
SetTabIndex: SetTabIndex::<Identity, OFFSET>,
KeyUp: 0,
RemoveKeyUp: RemoveKeyUp::<Identity, OFFSET>,
KeyDown: 0,
RemoveKeyDown: RemoveKeyDown::<Identity, OFFSET>,
GotFocus: GotFocus::<Identity, OFFSET>,
RemoveGotFocus: RemoveGotFocus::<Identity, OFFSET>,
LostFocus: LostFocus::<Identity, OFFSET>,
RemoveLostFocus: RemoveLostFocus::<Identity, OFFSET>,
DragStarting: 0,
RemoveDragStarting: RemoveDragStarting::<Identity, OFFSET>,
DropCompleted: 0,
RemoveDropCompleted: RemoveDropCompleted::<Identity, OFFSET>,
CharacterReceived: 0,
RemoveCharacterReceived: RemoveCharacterReceived::<Identity, OFFSET>,
DragEnter: 0,
RemoveDragEnter: RemoveDragEnter::<Identity, OFFSET>,
DragLeave: 0,
RemoveDragLeave: RemoveDragLeave::<Identity, OFFSET>,
DragOver: 0,
RemoveDragOver: RemoveDragOver::<Identity, OFFSET>,
Drop: 0,
RemoveDrop: RemoveDrop::<Identity, OFFSET>,
PointerPressed: PointerPressed::<Identity, OFFSET>,
RemovePointerPressed: RemovePointerPressed::<Identity, OFFSET>,
PointerMoved: PointerMoved::<Identity, OFFSET>,
RemovePointerMoved: RemovePointerMoved::<Identity, OFFSET>,
PointerReleased: PointerReleased::<Identity, OFFSET>,
RemovePointerReleased: RemovePointerReleased::<Identity, OFFSET>,
PointerEntered: PointerEntered::<Identity, OFFSET>,
RemovePointerEntered: RemovePointerEntered::<Identity, OFFSET>,
PointerExited: PointerExited::<Identity, OFFSET>,
RemovePointerExited: RemovePointerExited::<Identity, OFFSET>,
PointerCaptureLost: PointerCaptureLost::<Identity, OFFSET>,
RemovePointerCaptureLost: RemovePointerCaptureLost::<Identity, OFFSET>,
PointerCanceled: PointerCanceled::<Identity, OFFSET>,
RemovePointerCanceled: RemovePointerCanceled::<Identity, OFFSET>,
PointerWheelChanged: PointerWheelChanged::<Identity, OFFSET>,
RemovePointerWheelChanged: RemovePointerWheelChanged::<Identity, OFFSET>,
Tapped: 0,
RemoveTapped: RemoveTapped::<Identity, OFFSET>,
DoubleTapped: 0,
RemoveDoubleTapped: RemoveDoubleTapped::<Identity, OFFSET>,
Holding: 0,
RemoveHolding: RemoveHolding::<Identity, OFFSET>,
ContextRequested: 0,
RemoveContextRequested: RemoveContextRequested::<Identity, OFFSET>,
ContextCanceled: ContextCanceled::<Identity, OFFSET>,
RemoveContextCanceled: RemoveContextCanceled::<Identity, OFFSET>,
RightTapped: 0,
RemoveRightTapped: RemoveRightTapped::<Identity, OFFSET>,
ManipulationStarting: 0,
RemoveManipulationStarting: RemoveManipulationStarting::<Identity, OFFSET>,
ManipulationInertiaStarting: 0,
RemoveManipulationInertiaStarting: RemoveManipulationInertiaStarting::<Identity, OFFSET>,
ManipulationStarted: 0,
RemoveManipulationStarted: RemoveManipulationStarted::<Identity, OFFSET>,
ManipulationDelta: 0,
RemoveManipulationDelta: RemoveManipulationDelta::<Identity, OFFSET>,
ManipulationCompleted: 0,
RemoveManipulationCompleted: RemoveManipulationCompleted::<Identity, OFFSET>,
AccessKeyDisplayRequested: 0,
RemoveAccessKeyDisplayRequested: RemoveAccessKeyDisplayRequested::<Identity, OFFSET>,
AccessKeyDisplayDismissed: 0,
RemoveAccessKeyDisplayDismissed: RemoveAccessKeyDisplayDismissed::<Identity, OFFSET>,
AccessKeyInvoked: 0,
RemoveAccessKeyInvoked: RemoveAccessKeyInvoked::<Identity, OFFSET>,
ProcessKeyboardAccelerators: 0,
RemoveProcessKeyboardAccelerators: RemoveProcessKeyboardAccelerators::<Identity, OFFSET>,
GettingFocus: 0,
RemoveGettingFocus: RemoveGettingFocus::<Identity, OFFSET>,
LosingFocus: 0,
RemoveLosingFocus: RemoveLosingFocus::<Identity, OFFSET>,
NoFocusCandidateFound: 0,
RemoveNoFocusCandidateFound: RemoveNoFocusCandidateFound::<Identity, OFFSET>,
PreviewKeyDown: 0,
RemovePreviewKeyDown: RemovePreviewKeyDown::<Identity, OFFSET>,
PreviewKeyUp: 0,
RemovePreviewKeyUp: RemovePreviewKeyUp::<Identity, OFFSET>,
BringIntoViewRequested: 0,
RemoveBringIntoViewRequested: RemoveBringIntoViewRequested::<Identity, OFFSET>,
Measure: Measure::<Identity, OFFSET>,
Arrange: Arrange::<Identity, OFFSET>,
CapturePointer: CapturePointer::<Identity, OFFSET>,
ReleasePointerCapture: ReleasePointerCapture::<Identity, OFFSET>,
ReleasePointerCaptures: ReleasePointerCaptures::<Identity, OFFSET>,
AddHandler: 0,
RemoveHandler: 0,
TransformToVisual: 0,
InvalidateMeasure: InvalidateMeasure::<Identity, OFFSET>,
InvalidateArrange: InvalidateArrange::<Identity, OFFSET>,
UpdateLayout: UpdateLayout::<Identity, OFFSET>,
CancelDirectManipulations: CancelDirectManipulations::<Identity, OFFSET>,
StartDragAsync: StartDragAsync::<Identity, OFFSET>,
StartBringIntoView: StartBringIntoView::<Identity, OFFSET>,
StartBringIntoViewWithOptions: 0,
TryInvokeKeyboardAccelerator: 0,
Focus: 0,
StartAnimation: 0,
StopAnimation: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUIElement as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUIElement_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub DesiredSize: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows::Foundation::Size,
) -> windows_core::HRESULT,
pub AllowDrop:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetAllowDrop:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub Opacity:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetOpacity: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
Clip: usize,
SetClip: usize,
RenderTransform: usize,
SetRenderTransform: usize,
Projection: usize,
SetProjection: usize,
Transform3D: usize,
SetTransform3D: usize,
pub RenderTransformOrigin: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows::Foundation::Point,
) -> windows_core::HRESULT,
pub SetRenderTransformOrigin: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows::Foundation::Point,
) -> windows_core::HRESULT,
pub IsHitTestVisible:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsHitTestVisible:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub Visibility:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut Visibility) -> windows_core::HRESULT,
pub SetVisibility:
unsafe extern "system" fn(*mut core::ffi::c_void, Visibility) -> windows_core::HRESULT,
pub RenderSize: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows::Foundation::Size,
) -> windows_core::HRESULT,
pub UseLayoutRounding:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetUseLayoutRounding:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
Transitions: usize,
SetTransitions: usize,
CacheMode: usize,
SetCacheMode: usize,
pub IsTapEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsTapEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsDoubleTapEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsDoubleTapEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub CanDrag:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetCanDrag:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsRightTapEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsRightTapEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsHoldingEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsHoldingEnabled:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
ManipulationMode: usize,
SetManipulationMode: usize,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerCaptures: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerCaptures: usize,
ContextFlyout: usize,
SetContextFlyout: usize,
CompositeMode: usize,
SetCompositeMode: usize,
Lights: usize,
pub CanBeScrollAnchor:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetCanBeScrollAnchor:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub ExitDisplayModeOnAccessKeyInvoked:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetExitDisplayModeOnAccessKeyInvoked:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub IsAccessKeyScope:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsAccessKeyScope:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub AccessKeyScopeOwner: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetAccessKeyScopeOwner: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub AccessKey: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetAccessKey: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
KeyTipPlacementMode: usize,
SetKeyTipPlacementMode: usize,
pub KeyTipHorizontalOffset:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetKeyTipHorizontalOffset:
unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub KeyTipVerticalOffset:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetKeyTipVerticalOffset:
unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub KeyTipTarget: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetKeyTipTarget: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
XYFocusKeyboardNavigation: usize,
SetXYFocusKeyboardNavigation: usize,
XYFocusUpNavigationStrategy: usize,
SetXYFocusUpNavigationStrategy: usize,
XYFocusDownNavigationStrategy: usize,
SetXYFocusDownNavigationStrategy: usize,
XYFocusLeftNavigationStrategy: usize,
SetXYFocusLeftNavigationStrategy: usize,
XYFocusRightNavigationStrategy: usize,
SetXYFocusRightNavigationStrategy: usize,
KeyboardAccelerators: usize,
pub KeyboardAcceleratorPlacementTarget: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetKeyboardAcceleratorPlacementTarget: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
)
-> windows_core::HRESULT,
KeyboardAcceleratorPlacementMode: usize,
SetKeyboardAcceleratorPlacementMode: usize,
HighContrastAdjustment: usize,
SetHighContrastAdjustment: usize,
TabFocusNavigation: usize,
SetTabFocusNavigation: usize,
OpacityTransition: usize,
SetOpacityTransition: usize,
pub Translation: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_numerics::Vector3,
) -> windows_core::HRESULT,
pub SetTranslation: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_numerics::Vector3,
) -> windows_core::HRESULT,
TranslationTransition: usize,
SetTranslationTransition: usize,
pub Rotation:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub SetRotation:
unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT,
RotationTransition: usize,
SetRotationTransition: usize,
pub Scale: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_numerics::Vector3,
) -> windows_core::HRESULT,
pub SetScale: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_numerics::Vector3,
) -> windows_core::HRESULT,
ScaleTransition: usize,
SetScaleTransition: usize,
pub TransformMatrix: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_numerics::Matrix4x4,
) -> windows_core::HRESULT,
pub SetTransformMatrix: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_numerics::Matrix4x4,
) -> windows_core::HRESULT,
pub CenterPoint: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_numerics::Vector3,
) -> windows_core::HRESULT,
pub SetCenterPoint: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_numerics::Vector3,
) -> windows_core::HRESULT,
pub RotationAxis: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_numerics::Vector3,
) -> windows_core::HRESULT,
pub SetRotationAxis: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_numerics::Vector3,
) -> windows_core::HRESULT,
pub ActualOffset: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_numerics::Vector3,
) -> windows_core::HRESULT,
pub ActualSize: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_numerics::Vector2,
) -> windows_core::HRESULT,
pub XamlRoot: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetXamlRoot: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
Shadow: usize,
SetShadow: usize,
pub RasterizationScale:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetRasterizationScale:
unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
FocusState: usize,
pub UseSystemFocusVisuals:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetUseSystemFocusVisuals:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub XYFocusLeft: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetXYFocusLeft: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub XYFocusRight: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetXYFocusRight: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub XYFocusUp: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetXYFocusUp: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub XYFocusDown: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetXYFocusDown: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub IsTabStop:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetIsTabStop:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub TabIndex:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub SetTabIndex:
unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
KeyUp: usize,
pub RemoveKeyUp:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
KeyDown: usize,
pub RemoveKeyDown:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub GotFocus: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveGotFocus:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub LostFocus: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveLostFocus:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
DragStarting: usize,
pub RemoveDragStarting:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
DropCompleted: usize,
pub RemoveDropCompleted:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
CharacterReceived: usize,
pub RemoveCharacterReceived:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
DragEnter: usize,
pub RemoveDragEnter:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
DragLeave: usize,
pub RemoveDragLeave:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
DragOver: usize,
pub RemoveDragOver:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
Drop: usize,
pub RemoveDrop: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerPressed: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerPressed: usize,
pub RemovePointerPressed:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerMoved: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerMoved: usize,
pub RemovePointerMoved:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerReleased: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerReleased: usize,
pub RemovePointerReleased:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerEntered: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerEntered: usize,
pub RemovePointerEntered:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerExited: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerExited: usize,
pub RemovePointerExited:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerCaptureLost: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerCaptureLost: usize,
pub RemovePointerCaptureLost:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerCanceled: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerCanceled: usize,
pub RemovePointerCanceled:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub PointerWheelChanged: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
PointerWheelChanged: usize,
pub RemovePointerWheelChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
Tapped: usize,
pub RemoveTapped:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
DoubleTapped: usize,
pub RemoveDoubleTapped:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
Holding: usize,
pub RemoveHolding:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
ContextRequested: usize,
pub RemoveContextRequested:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
#[cfg(feature = "UI_Composition")]
pub ContextCanceled: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
ContextCanceled: usize,
pub RemoveContextCanceled:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
RightTapped: usize,
pub RemoveRightTapped:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
ManipulationStarting: usize,
pub RemoveManipulationStarting:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
ManipulationInertiaStarting: usize,
pub RemoveManipulationInertiaStarting:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
ManipulationStarted: usize,
pub RemoveManipulationStarted:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
ManipulationDelta: usize,
pub RemoveManipulationDelta:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
ManipulationCompleted: usize,
pub RemoveManipulationCompleted:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
AccessKeyDisplayRequested: usize,
pub RemoveAccessKeyDisplayRequested:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
AccessKeyDisplayDismissed: usize,
pub RemoveAccessKeyDisplayDismissed:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
AccessKeyInvoked: usize,
pub RemoveAccessKeyInvoked:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
ProcessKeyboardAccelerators: usize,
pub RemoveProcessKeyboardAccelerators:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
GettingFocus: usize,
pub RemoveGettingFocus:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
LosingFocus: usize,
pub RemoveLosingFocus:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
NoFocusCandidateFound: usize,
pub RemoveNoFocusCandidateFound:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
PreviewKeyDown: usize,
pub RemovePreviewKeyDown:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
PreviewKeyUp: usize,
pub RemovePreviewKeyUp:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
BringIntoViewRequested: usize,
pub RemoveBringIntoViewRequested:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Measure: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows::Foundation::Size,
) -> windows_core::HRESULT,
pub Arrange: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows::Foundation::Rect,
) -> windows_core::HRESULT,
#[cfg(feature = "UI_Xaml_Input")]
pub CapturePointer: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
CapturePointer: usize,
#[cfg(feature = "UI_Xaml_Input")]
pub ReleasePointerCapture: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
ReleasePointerCapture: usize,
pub ReleasePointerCaptures:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
AddHandler: usize,
RemoveHandler: usize,
TransformToVisual: usize,
pub InvalidateMeasure:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub InvalidateArrange:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub UpdateLayout: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub CancelDirectManipulations:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
#[cfg(feature = "UI_Input")]
pub StartDragAsync: 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_Input"))]
StartDragAsync: usize,
pub StartBringIntoView:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
StartBringIntoViewWithOptions: usize,
TryInvokeKeyboardAccelerator: usize,
Focus: usize,
StartAnimation: usize,
StopAnimation: usize,
}
windows_core::imp::define_interface!(
IUIElementFactory,
IUIElementFactory_Vtbl,
0x14d1d309_add0_5ccb_b946_77488cd70f87
);
impl windows_core::RuntimeType for IUIElementFactory {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IUIElementFactory {
const NAME: &'static str = "Microsoft.UI.Xaml.IUIElementFactory";
}
pub trait IUIElementFactory_Impl: windows_core::IUnknownImpl {}
impl IUIElementFactory_Vtbl {
pub const fn new<Identity: IUIElementFactory_Impl, const OFFSET: isize>() -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IUIElementFactory, OFFSET>(),
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUIElementFactory as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUIElementFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
}
windows_core::imp::define_interface!(
IUIElementOverrides,
IUIElementOverrides_Vtbl,
0x9034f41e_ab7b_59e7_8168_50de6b689dde
);
impl windows_core::RuntimeType for IUIElementOverrides {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl IUIElementOverrides {
pub fn OnDisconnectVisualChildren(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).OnDisconnectVisualChildren)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn FindSubElementsForTouchTargeting(
&self,
point: windows::Foundation::Point,
boundingrect: windows::Foundation::Rect,
) -> windows_core::Result<
windows_collections::IIterable<windows_collections::IIterable<windows::Foundation::Point>>,
> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindSubElementsForTouchTargeting)(
windows_core::Interface::as_raw(this),
point,
boundingrect,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetChildrenInTabFocusOrder(
&self,
) -> windows_core::Result<windows_collections::IIterable<DependencyObject>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetChildrenInTabFocusOrder)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeName for IUIElementOverrides {
const NAME: &'static str = "Microsoft.UI.Xaml.IUIElementOverrides";
}
pub trait IUIElementOverrides_Impl: windows_core::IUnknownImpl {
fn OnDisconnectVisualChildren(&self) -> windows_core::Result<()>;
fn FindSubElementsForTouchTargeting(
&self,
point: &windows::Foundation::Point,
boundingRect: &windows::Foundation::Rect,
) -> windows_core::Result<
windows_collections::IIterable<windows_collections::IIterable<windows::Foundation::Point>>,
>;
fn GetChildrenInTabFocusOrder(
&self,
) -> windows_core::Result<windows_collections::IIterable<DependencyObject>>;
}
impl IUIElementOverrides_Vtbl {
pub const fn new<Identity: IUIElementOverrides_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnDisconnectVisualChildren<
Identity: IUIElementOverrides_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElementOverrides_Impl::OnDisconnectVisualChildren(this).into()
}
}
unsafe extern "system" fn FindSubElementsForTouchTargeting<
Identity: IUIElementOverrides_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
point: windows::Foundation::Point,
boundingrect: windows::Foundation::Rect,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUIElementOverrides_Impl::FindSubElementsForTouchTargeting(
this,
core::mem::transmute(&point),
core::mem::transmute(&boundingrect),
) {
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 GetChildrenInTabFocusOrder<
Identity: IUIElementOverrides_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 IUIElementOverrides_Impl::GetChildrenInTabFocusOrder(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, IUIElementOverrides, OFFSET>(),
OnCreateAutomationPeer: 0,
OnDisconnectVisualChildren: OnDisconnectVisualChildren::<Identity, OFFSET>,
FindSubElementsForTouchTargeting: FindSubElementsForTouchTargeting::<Identity, OFFSET>,
GetChildrenInTabFocusOrder: GetChildrenInTabFocusOrder::<Identity, OFFSET>,
OnKeyboardAcceleratorInvoked: 0,
OnProcessKeyboardAccelerators: 0,
OnBringIntoViewRequested: 0,
PopulatePropertyInfoOverride: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUIElementOverrides as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUIElementOverrides_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
OnCreateAutomationPeer: usize,
pub OnDisconnectVisualChildren:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub FindSubElementsForTouchTargeting: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows::Foundation::Point,
windows::Foundation::Rect,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub GetChildrenInTabFocusOrder: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
OnKeyboardAcceleratorInvoked: usize,
OnProcessKeyboardAccelerators: usize,
OnBringIntoViewRequested: usize,
PopulatePropertyInfoOverride: usize,
}
windows_core::imp::define_interface!(
IUIElementProtected,
IUIElementProtected_Vtbl,
0x8f69b9e9_1f00_5834_9bf1_a9257bed39f0
);
impl windows_core::RuntimeType for IUIElementProtected {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IUIElementProtected {
const NAME: &'static str = "Microsoft.UI.Xaml.IUIElementProtected";
}
pub trait IUIElementProtected_Impl: windows_core::IUnknownImpl {}
impl IUIElementProtected_Vtbl {
pub const fn new<Identity: IUIElementProtected_Impl, const OFFSET: isize>() -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IUIElementProtected, OFFSET>(),
ProtectedCursor: 0,
SetProtectedCursor: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUIElementProtected as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUIElementProtected_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
ProtectedCursor: usize,
SetProtectedCursor: usize,
}
windows_core::imp::define_interface!(
IUIElementStatics,
IUIElementStatics_Vtbl,
0xd2921d87_3584_5e22_8a3a_c2c78dab4f6e
);
impl windows_core::RuntimeType for IUIElementStatics {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(all(feature = "UI_Composition", feature = "UI_Xaml_Input"))]
impl windows_core::RuntimeName for IUIElementStatics {
const NAME: &'static str = "Microsoft.UI.Xaml.IUIElementStatics";
}
#[cfg(all(feature = "UI_Composition", feature = "UI_Xaml_Input"))]
pub trait IUIElementStatics_Impl: windows_core::IUnknownImpl {
fn TryStartDirectManipulation(
&self,
value: windows_core::Ref<Input::Pointer>,
) -> windows_core::Result<bool>;
fn RegisterAsScrollPort(
&self,
element: windows_core::Ref<UIElement>,
) -> windows_core::Result<()>;
}
#[cfg(all(feature = "UI_Composition", feature = "UI_Xaml_Input"))]
impl IUIElementStatics_Vtbl {
pub const fn new<Identity: IUIElementStatics_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn TryStartDirectManipulation<
Identity: IUIElementStatics_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *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 IUIElementStatics_Impl::TryStartDirectManipulation(
this,
core::mem::transmute_copy(&value),
) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RegisterAsScrollPort<
Identity: IUIElementStatics_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
element: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUIElementStatics_Impl::RegisterAsScrollPort(
this,
core::mem::transmute_copy(&element),
)
.into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IUIElementStatics, OFFSET>(),
KeyDownEvent: 0,
KeyUpEvent: 0,
PointerEnteredEvent: 0,
PointerPressedEvent: 0,
PointerMovedEvent: 0,
PointerReleasedEvent: 0,
PointerExitedEvent: 0,
PointerCaptureLostEvent: 0,
PointerCanceledEvent: 0,
PointerWheelChangedEvent: 0,
TappedEvent: 0,
DoubleTappedEvent: 0,
HoldingEvent: 0,
RightTappedEvent: 0,
ManipulationStartingEvent: 0,
ManipulationInertiaStartingEvent: 0,
ManipulationStartedEvent: 0,
ManipulationDeltaEvent: 0,
ManipulationCompletedEvent: 0,
DragEnterEvent: 0,
DragLeaveEvent: 0,
DragOverEvent: 0,
DropEvent: 0,
GettingFocusEvent: 0,
LosingFocusEvent: 0,
NoFocusCandidateFoundEvent: 0,
PreviewKeyDownEvent: 0,
CharacterReceivedEvent: 0,
PreviewKeyUpEvent: 0,
BringIntoViewRequestedEvent: 0,
ContextRequestedEvent: 0,
AllowDropProperty: 0,
OpacityProperty: 0,
ClipProperty: 0,
RenderTransformProperty: 0,
ProjectionProperty: 0,
Transform3DProperty: 0,
RenderTransformOriginProperty: 0,
IsHitTestVisibleProperty: 0,
VisibilityProperty: 0,
UseLayoutRoundingProperty: 0,
TransitionsProperty: 0,
CacheModeProperty: 0,
IsTapEnabledProperty: 0,
IsDoubleTapEnabledProperty: 0,
CanDragProperty: 0,
IsRightTapEnabledProperty: 0,
IsHoldingEnabledProperty: 0,
ManipulationModeProperty: 0,
PointerCapturesProperty: 0,
ContextFlyoutProperty: 0,
CompositeModeProperty: 0,
LightsProperty: 0,
CanBeScrollAnchorProperty: 0,
ExitDisplayModeOnAccessKeyInvokedProperty: 0,
IsAccessKeyScopeProperty: 0,
AccessKeyScopeOwnerProperty: 0,
AccessKeyProperty: 0,
KeyTipPlacementModeProperty: 0,
KeyTipHorizontalOffsetProperty: 0,
KeyTipVerticalOffsetProperty: 0,
KeyTipTargetProperty: 0,
XYFocusKeyboardNavigationProperty: 0,
XYFocusUpNavigationStrategyProperty: 0,
XYFocusDownNavigationStrategyProperty: 0,
XYFocusLeftNavigationStrategyProperty: 0,
XYFocusRightNavigationStrategyProperty: 0,
KeyboardAcceleratorPlacementTargetProperty: 0,
KeyboardAcceleratorPlacementModeProperty: 0,
HighContrastAdjustmentProperty: 0,
TabFocusNavigationProperty: 0,
ShadowProperty: 0,
FocusStateProperty: 0,
UseSystemFocusVisualsProperty: 0,
XYFocusLeftProperty: 0,
XYFocusRightProperty: 0,
XYFocusUpProperty: 0,
XYFocusDownProperty: 0,
IsTabStopProperty: 0,
TabIndexProperty: 0,
TryStartDirectManipulation: TryStartDirectManipulation::<Identity, OFFSET>,
RegisterAsScrollPort: RegisterAsScrollPort::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUIElementStatics as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUIElementStatics_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
KeyDownEvent: usize,
KeyUpEvent: usize,
PointerEnteredEvent: usize,
PointerPressedEvent: usize,
PointerMovedEvent: usize,
PointerReleasedEvent: usize,
PointerExitedEvent: usize,
PointerCaptureLostEvent: usize,
PointerCanceledEvent: usize,
PointerWheelChangedEvent: usize,
TappedEvent: usize,
DoubleTappedEvent: usize,
HoldingEvent: usize,
RightTappedEvent: usize,
ManipulationStartingEvent: usize,
ManipulationInertiaStartingEvent: usize,
ManipulationStartedEvent: usize,
ManipulationDeltaEvent: usize,
ManipulationCompletedEvent: usize,
DragEnterEvent: usize,
DragLeaveEvent: usize,
DragOverEvent: usize,
DropEvent: usize,
GettingFocusEvent: usize,
LosingFocusEvent: usize,
NoFocusCandidateFoundEvent: usize,
PreviewKeyDownEvent: usize,
CharacterReceivedEvent: usize,
PreviewKeyUpEvent: usize,
BringIntoViewRequestedEvent: usize,
ContextRequestedEvent: usize,
AllowDropProperty: usize,
OpacityProperty: usize,
ClipProperty: usize,
RenderTransformProperty: usize,
ProjectionProperty: usize,
Transform3DProperty: usize,
RenderTransformOriginProperty: usize,
IsHitTestVisibleProperty: usize,
VisibilityProperty: usize,
UseLayoutRoundingProperty: usize,
TransitionsProperty: usize,
CacheModeProperty: usize,
IsTapEnabledProperty: usize,
IsDoubleTapEnabledProperty: usize,
CanDragProperty: usize,
IsRightTapEnabledProperty: usize,
IsHoldingEnabledProperty: usize,
ManipulationModeProperty: usize,
PointerCapturesProperty: usize,
ContextFlyoutProperty: usize,
CompositeModeProperty: usize,
LightsProperty: usize,
CanBeScrollAnchorProperty: usize,
ExitDisplayModeOnAccessKeyInvokedProperty: usize,
IsAccessKeyScopeProperty: usize,
AccessKeyScopeOwnerProperty: usize,
AccessKeyProperty: usize,
KeyTipPlacementModeProperty: usize,
KeyTipHorizontalOffsetProperty: usize,
KeyTipVerticalOffsetProperty: usize,
KeyTipTargetProperty: usize,
XYFocusKeyboardNavigationProperty: usize,
XYFocusUpNavigationStrategyProperty: usize,
XYFocusDownNavigationStrategyProperty: usize,
XYFocusLeftNavigationStrategyProperty: usize,
XYFocusRightNavigationStrategyProperty: usize,
KeyboardAcceleratorPlacementTargetProperty: usize,
KeyboardAcceleratorPlacementModeProperty: usize,
HighContrastAdjustmentProperty: usize,
TabFocusNavigationProperty: usize,
ShadowProperty: usize,
FocusStateProperty: usize,
UseSystemFocusVisualsProperty: usize,
XYFocusLeftProperty: usize,
XYFocusRightProperty: usize,
XYFocusUpProperty: usize,
XYFocusDownProperty: usize,
IsTabStopProperty: usize,
TabIndexProperty: usize,
#[cfg(feature = "UI_Xaml_Input")]
pub TryStartDirectManipulation: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Input"))]
TryStartDirectManipulation: usize,
#[cfg(feature = "UI_Composition")]
pub RegisterAsScrollPort: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
RegisterAsScrollPort: usize,
}
windows_core::imp::define_interface!(
IUnhandledExceptionEventArgs,
IUnhandledExceptionEventArgs_Vtbl,
0x59eaeba9_8f9c_5be7_9b3b_820960faa220
);
impl windows_core::RuntimeType for IUnhandledExceptionEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IUnhandledExceptionEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.IUnhandledExceptionEventArgs";
}
pub trait IUnhandledExceptionEventArgs_Impl: windows_core::IUnknownImpl {
fn Exception(&self) -> windows_core::Result<windows_core::HRESULT>;
fn Message(&self) -> windows_core::Result<windows_core::HSTRING>;
fn Handled(&self) -> windows_core::Result<bool>;
fn SetHandled(&self, value: bool) -> windows_core::Result<()>;
}
impl IUnhandledExceptionEventArgs_Vtbl {
pub const fn new<Identity: IUnhandledExceptionEventArgs_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Exception<
Identity: IUnhandledExceptionEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut windows_core::HRESULT,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IUnhandledExceptionEventArgs_Impl::Exception(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Message<
Identity: IUnhandledExceptionEventArgs_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 IUnhandledExceptionEventArgs_Impl::Message(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 Handled<
Identity: IUnhandledExceptionEventArgs_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 IUnhandledExceptionEventArgs_Impl::Handled(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetHandled<
Identity: IUnhandledExceptionEventArgs_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IUnhandledExceptionEventArgs_Impl::SetHandled(this, value).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IUnhandledExceptionEventArgs,
OFFSET,
>(),
Exception: Exception::<Identity, OFFSET>,
Message: Message::<Identity, OFFSET>,
Handled: Handled::<Identity, OFFSET>,
SetHandled: SetHandled::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IUnhandledExceptionEventArgs as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IUnhandledExceptionEventArgs_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Exception: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_core::HRESULT,
) -> windows_core::HRESULT,
pub Message: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
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,
}
windows_core::imp::define_interface!(
IWindow,
IWindow_Vtbl,
0x61f0ec79_5d52_56b5_86fb_40fa4af288b0
);
impl windows_core::RuntimeType for IWindow {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(all(feature = "UI_Composition", feature = "UI_Dispatching"))]
impl windows_core::RuntimeName for IWindow {
const NAME: &'static str = "Microsoft.UI.Xaml.IWindow";
}
#[cfg(all(feature = "UI_Composition", feature = "UI_Dispatching"))]
pub trait IWindow_Impl: windows_core::IUnknownImpl {
fn Bounds(&self) -> windows_core::Result<windows::Foundation::Rect>;
fn Visible(&self) -> windows_core::Result<bool>;
fn Content(&self) -> windows_core::Result<UIElement>;
fn SetContent(&self, value: windows_core::Ref<UIElement>) -> windows_core::Result<()>;
fn CoreWindow(&self) -> windows_core::Result<windows::UI::Core::CoreWindow>;
fn Dispatcher(&self) -> windows_core::Result<windows::UI::Core::CoreDispatcher>;
fn DispatcherQueue(&self) -> windows_core::Result<super::Dispatching::DispatcherQueue>;
fn Title(&self) -> windows_core::Result<windows_core::HSTRING>;
fn SetTitle(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>;
fn ExtendsContentIntoTitleBar(&self) -> windows_core::Result<bool>;
fn SetExtendsContentIntoTitleBar(&self, value: bool) -> windows_core::Result<()>;
fn RemoveActivated(&self, token: i64) -> windows_core::Result<()>;
fn RemoveClosed(&self, token: i64) -> windows_core::Result<()>;
fn RemoveSizeChanged(&self, token: i64) -> windows_core::Result<()>;
fn RemoveVisibilityChanged(&self, token: i64) -> windows_core::Result<()>;
fn Activate(&self) -> windows_core::Result<()>;
fn Close(&self) -> windows_core::Result<()>;
fn SetTitleBar(&self, titleBar: windows_core::Ref<UIElement>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "UI_Composition", feature = "UI_Dispatching"))]
impl IWindow_Vtbl {
pub const fn new<Identity: IWindow_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Bounds<Identity: IWindow_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows::Foundation::Rect,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IWindow_Impl::Bounds(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Visible<Identity: IWindow_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 IWindow_Impl::Visible(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Content<Identity: IWindow_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 IWindow_Impl::Content(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 SetContent<Identity: IWindow_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWindow_Impl::SetContent(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn CoreWindow<Identity: IWindow_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 IWindow_Impl::CoreWindow(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 Dispatcher<Identity: IWindow_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 IWindow_Impl::Dispatcher(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 DispatcherQueue<Identity: IWindow_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 IWindow_Impl::DispatcherQueue(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 Title<Identity: IWindow_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 IWindow_Impl::Title(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 SetTitle<Identity: IWindow_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWindow_Impl::SetTitle(this, core::mem::transmute(&value)).into()
}
}
unsafe extern "system" fn ExtendsContentIntoTitleBar<
Identity: IWindow_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 IWindow_Impl::ExtendsContentIntoTitleBar(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetExtendsContentIntoTitleBar<
Identity: IWindow_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWindow_Impl::SetExtendsContentIntoTitleBar(this, value).into()
}
}
unsafe extern "system" fn RemoveActivated<Identity: IWindow_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);
IWindow_Impl::RemoveActivated(this, token).into()
}
}
unsafe extern "system" fn RemoveClosed<Identity: IWindow_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);
IWindow_Impl::RemoveClosed(this, token).into()
}
}
unsafe extern "system" fn RemoveSizeChanged<Identity: IWindow_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);
IWindow_Impl::RemoveSizeChanged(this, token).into()
}
}
unsafe extern "system" fn RemoveVisibilityChanged<
Identity: IWindow_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);
IWindow_Impl::RemoveVisibilityChanged(this, token).into()
}
}
unsafe extern "system" fn Activate<Identity: IWindow_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWindow_Impl::Activate(this).into()
}
}
unsafe extern "system" fn Close<Identity: IWindow_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWindow_Impl::Close(this).into()
}
}
unsafe extern "system" fn SetTitleBar<Identity: IWindow_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
titlebar: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWindow_Impl::SetTitleBar(this, core::mem::transmute_copy(&titlebar)).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IWindow, OFFSET>(),
Bounds: Bounds::<Identity, OFFSET>,
Visible: Visible::<Identity, OFFSET>,
Content: Content::<Identity, OFFSET>,
SetContent: SetContent::<Identity, OFFSET>,
CoreWindow: CoreWindow::<Identity, OFFSET>,
Compositor: 0,
Dispatcher: Dispatcher::<Identity, OFFSET>,
DispatcherQueue: DispatcherQueue::<Identity, OFFSET>,
Title: Title::<Identity, OFFSET>,
SetTitle: SetTitle::<Identity, OFFSET>,
ExtendsContentIntoTitleBar: ExtendsContentIntoTitleBar::<Identity, OFFSET>,
SetExtendsContentIntoTitleBar: SetExtendsContentIntoTitleBar::<Identity, OFFSET>,
Activated: 0,
RemoveActivated: RemoveActivated::<Identity, OFFSET>,
Closed: 0,
RemoveClosed: RemoveClosed::<Identity, OFFSET>,
SizeChanged: 0,
RemoveSizeChanged: RemoveSizeChanged::<Identity, OFFSET>,
VisibilityChanged: 0,
RemoveVisibilityChanged: RemoveVisibilityChanged::<Identity, OFFSET>,
Activate: Activate::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
SetTitleBar: SetTitleBar::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWindow as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWindow_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Bounds: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows::Foundation::Rect,
) -> windows_core::HRESULT,
pub Visible:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
#[cfg(feature = "UI_Composition")]
pub Content: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
Content: usize,
#[cfg(feature = "UI_Composition")]
pub SetContent: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
SetContent: usize,
pub CoreWindow: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
Compositor: usize,
pub Dispatcher: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(feature = "UI_Dispatching")]
pub DispatcherQueue: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Dispatching"))]
DispatcherQueue: usize,
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 ExtendsContentIntoTitleBar:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetExtendsContentIntoTitleBar:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
Activated: usize,
pub RemoveActivated:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
Closed: usize,
pub RemoveClosed:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
SizeChanged: usize,
pub RemoveSizeChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
VisibilityChanged: usize,
pub RemoveVisibilityChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Activate: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "UI_Composition")]
pub SetTitleBar: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
SetTitleBar: usize,
}
windows_core::imp::define_interface!(
IWindow2,
IWindow2_Vtbl,
0x42febaa5_1c32_522a_a591_57618c6f665d
);
impl windows_core::RuntimeType for IWindow2 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(all(feature = "UI_Windowing", feature = "UI_Xaml_Media"))]
impl windows_core::RuntimeName for IWindow2 {
const NAME: &'static str = "Microsoft.UI.Xaml.IWindow2";
}
#[cfg(all(feature = "UI_Windowing", feature = "UI_Xaml_Media"))]
pub trait IWindow2_Impl: windows_core::IUnknownImpl {
fn SystemBackdrop(&self) -> windows_core::Result<Media::SystemBackdrop>;
fn SetSystemBackdrop(
&self,
value: windows_core::Ref<Media::SystemBackdrop>,
) -> windows_core::Result<()>;
fn AppWindow(&self) -> windows_core::Result<super::Windowing::AppWindow>;
}
#[cfg(all(feature = "UI_Windowing", feature = "UI_Xaml_Media"))]
impl IWindow2_Vtbl {
pub const fn new<Identity: IWindow2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SystemBackdrop<Identity: IWindow2_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 IWindow2_Impl::SystemBackdrop(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 SetSystemBackdrop<
Identity: IWindow2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWindow2_Impl::SetSystemBackdrop(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn AppWindow<Identity: IWindow2_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 IWindow2_Impl::AppWindow(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, IWindow2, OFFSET>(),
SystemBackdrop: SystemBackdrop::<Identity, OFFSET>,
SetSystemBackdrop: SetSystemBackdrop::<Identity, OFFSET>,
AppWindow: AppWindow::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWindow2 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWindow2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "UI_Xaml_Media")]
pub SystemBackdrop: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Media"))]
SystemBackdrop: usize,
#[cfg(feature = "UI_Xaml_Media")]
pub SetSystemBackdrop: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Xaml_Media"))]
SetSystemBackdrop: usize,
#[cfg(feature = "UI_Windowing")]
pub AppWindow: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Windowing"))]
AppWindow: usize,
}
windows_core::imp::define_interface!(
IWindowFactory,
IWindowFactory_Vtbl,
0xf0441536_afef_5222_918f_324a9b2dec75
);
impl windows_core::RuntimeType for IWindowFactory {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IWindowFactory {
const NAME: &'static str = "Microsoft.UI.Xaml.IWindowFactory";
}
pub trait IWindowFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
baseInterface: windows_core::Ref<windows_core::IInspectable>,
innerInterface: windows_core::OutRef<windows_core::IInspectable>,
) -> windows_core::Result<Window>;
}
impl IWindowFactory_Vtbl {
pub const fn new<Identity: IWindowFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<
Identity: IWindowFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
baseinterface: *mut core::ffi::c_void,
innerinterface: *mut *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 IWindowFactory_Impl::CreateInstance(
this,
core::mem::transmute_copy(&baseinterface),
core::mem::transmute_copy(&innerinterface),
) {
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, IWindowFactory, OFFSET>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWindowFactory as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWindowFactory_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IWindowStatics,
IWindowStatics_Vtbl,
0x8cc985e3_a41a_5df4_b531_d3a1788d86c5
);
impl windows_core::RuntimeType for IWindowStatics {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IWindowStatics {
const NAME: &'static str = "Microsoft.UI.Xaml.IWindowStatics";
}
pub trait IWindowStatics_Impl: windows_core::IUnknownImpl {
fn Current(&self) -> windows_core::Result<Window>;
}
impl IWindowStatics_Vtbl {
pub const fn new<Identity: IWindowStatics_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Current<Identity: IWindowStatics_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 IWindowStatics_Impl::Current(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, IWindowStatics, OFFSET>(),
Current: Current::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWindowStatics as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWindowStatics_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!(
IXamlRoot,
IXamlRoot_Vtbl,
0x60cb215a_ad15_520a_8b01_4416824f0441
);
impl windows_core::RuntimeType for IXamlRoot {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
#[cfg(feature = "UI_Composition")]
impl windows_core::RuntimeName for IXamlRoot {
const NAME: &'static str = "Microsoft.UI.Xaml.IXamlRoot";
}
#[cfg(feature = "UI_Composition")]
pub trait IXamlRoot_Impl: windows_core::IUnknownImpl {
fn Content(&self) -> windows_core::Result<UIElement>;
fn Size(&self) -> windows_core::Result<windows::Foundation::Size>;
fn RasterizationScale(&self) -> windows_core::Result<f64>;
fn IsHostVisible(&self) -> windows_core::Result<bool>;
fn RemoveChanged(&self, token: i64) -> windows_core::Result<()>;
}
#[cfg(feature = "UI_Composition")]
impl IXamlRoot_Vtbl {
pub const fn new<Identity: IXamlRoot_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Content<Identity: IXamlRoot_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 IXamlRoot_Impl::Content(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 Size<Identity: IXamlRoot_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows::Foundation::Size,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IXamlRoot_Impl::Size(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RasterizationScale<
Identity: IXamlRoot_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 IXamlRoot_Impl::RasterizationScale(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsHostVisible<Identity: IXamlRoot_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 IXamlRoot_Impl::IsHostVisible(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveChanged<Identity: IXamlRoot_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);
IXamlRoot_Impl::RemoveChanged(this, token).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IXamlRoot, OFFSET>(),
Content: Content::<Identity, OFFSET>,
Size: Size::<Identity, OFFSET>,
RasterizationScale: RasterizationScale::<Identity, OFFSET>,
IsHostVisible: IsHostVisible::<Identity, OFFSET>,
Changed: 0,
RemoveChanged: RemoveChanged::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IXamlRoot as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IXamlRoot_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
#[cfg(feature = "UI_Composition")]
pub Content: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "UI_Composition"))]
Content: usize,
pub Size: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows::Foundation::Size,
) -> windows_core::HRESULT,
pub RasterizationScale:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub IsHostVisible:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
Changed: usize,
pub RemoveChanged:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IXamlRoot2,
IXamlRoot2_Vtbl,
0xbdee0f42_71cb_50c5_829b_4614d98c5794
);
impl windows_core::RuntimeType for IXamlRoot2 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IXamlRoot2 {
const NAME: &'static str = "Microsoft.UI.Xaml.IXamlRoot2";
}
pub trait IXamlRoot2_Impl: windows_core::IUnknownImpl {}
impl IXamlRoot2_Vtbl {
pub const fn new<Identity: IXamlRoot2_Impl, const OFFSET: isize>() -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IXamlRoot2, OFFSET>(),
ContentIslandEnvironment: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IXamlRoot2 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IXamlRoot2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
ContentIslandEnvironment: usize,
}
windows_core::imp::define_interface!(
IXamlRoot3,
IXamlRoot3_Vtbl,
0xb71dbf3b_2e0f_5de0_ac68_f0c1f65114c8
);
impl windows_core::RuntimeType for IXamlRoot3 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IXamlRoot3 {
const NAME: &'static str = "Microsoft.UI.Xaml.IXamlRoot3";
}
pub trait IXamlRoot3_Impl: windows_core::IUnknownImpl {}
impl IXamlRoot3_Vtbl {
pub const fn new<Identity: IXamlRoot3_Impl, const OFFSET: isize>() -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IXamlRoot3, OFFSET>(),
CoordinateConverter: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IXamlRoot3 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IXamlRoot3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
CoordinateConverter: usize,
}
windows_core::imp::define_interface!(
IXamlRoot4,
IXamlRoot4_Vtbl,
0x377bec22_632b_52be_b26f_5edf7838e5ca
);
impl windows_core::RuntimeType for IXamlRoot4 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IXamlRoot4 {
const NAME: &'static str = "Microsoft.UI.Xaml.IXamlRoot4";
}
pub trait IXamlRoot4_Impl: windows_core::IUnknownImpl {}
impl IXamlRoot4_Vtbl {
pub const fn new<Identity: IXamlRoot4_Impl, const OFFSET: isize>() -> Self {
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IXamlRoot4, OFFSET>(),
ContentIsland: 0,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IXamlRoot4 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IXamlRoot4_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
ContentIsland: usize,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct LaunchActivatedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
LaunchActivatedEventArgs,
windows_core::IUnknown,
windows_core::IInspectable
);
impl LaunchActivatedEventArgs {
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 UWPLaunchActivatedEventArgs(
&self,
) -> windows_core::Result<windows::ApplicationModel::Activation::LaunchActivatedEventArgs> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UWPLaunchActivatedEventArgs)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for LaunchActivatedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, ILaunchActivatedEventArgs>();
}
unsafe impl windows_core::Interface for LaunchActivatedEventArgs {
type Vtable = <ILaunchActivatedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <ILaunchActivatedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for LaunchActivatedEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.LaunchActivatedEventArgs";
}
unsafe impl Send for LaunchActivatedEventArgs {}
unsafe impl Sync for LaunchActivatedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ResourceDictionary(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
ResourceDictionary,
windows_core::IUnknown,
windows_core::IInspectable
);
windows_core::imp::required_hierarchy ! ( ResourceDictionary , windows_collections:: IIterable < windows_collections:: IKeyValuePair < windows_core::IInspectable , windows_core::IInspectable > > , windows_collections:: IMap < windows_core::IInspectable , windows_core::IInspectable > , DependencyObject );
impl ResourceDictionary {
pub fn Dispatcher(&self) -> windows_core::Result<windows::UI::Core::CoreDispatcher> {
let this = &windows_core::Interface::cast::<IDependencyObject>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Dispatcher)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI_Dispatching")]
pub fn DispatcherQueue(&self) -> windows_core::Result<super::Dispatching::DispatcherQueue> {
let this = &windows_core::Interface::cast::<IDependencyObject>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DispatcherQueue)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn First(
&self,
) -> windows_core::Result<
windows_collections::IIterator<
windows_collections::IKeyValuePair<
windows_core::IInspectable,
windows_core::IInspectable,
>,
>,
> {
let this = &windows_core::Interface::cast::<
windows_collections::IIterable<
windows_collections::IKeyValuePair<
windows_core::IInspectable,
windows_core::IInspectable,
>,
>,
>(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 Lookup<P0>(&self, key: P0) -> windows_core::Result<windows_core::IInspectable>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = &windows_core::Interface::cast::<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Lookup)(
windows_core::Interface::as_raw(this),
key.param().abi(),
&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::IInspectable, windows_core::IInspectable>,
>(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<P0>(&self, key: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = &windows_core::Interface::cast::<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).HasKey)(
windows_core::Interface::as_raw(this),
key.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn GetView(
&self,
) -> windows_core::Result<
windows_collections::IMapView<windows_core::IInspectable, windows_core::IInspectable>,
> {
let this = &windows_core::Interface::cast::<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
>(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<P0, P1>(&self, key: P0, value: P1) -> windows_core::Result<bool>
where
P0: windows_core::Param<windows_core::IInspectable>,
P1: windows_core::Param<windows_core::IInspectable>,
{
let this = &windows_core::Interface::cast::<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Insert)(
windows_core::Interface::as_raw(this),
key.param().abi(),
value.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn Remove<P0>(&self, key: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
{
let this = &windows_core::Interface::cast::<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
>(self)?;
unsafe {
(windows_core::Interface::vtable(this).Remove)(
windows_core::Interface::as_raw(this),
key.param().abi(),
)
.ok()
}
}
pub fn Clear(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
>(self)?;
unsafe {
(windows_core::Interface::vtable(this).Clear)(windows_core::Interface::as_raw(this))
.ok()
}
}
pub fn Source(&self) -> windows_core::Result<windows::Foundation::Uri> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Source)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetSource<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows::Foundation::Uri>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetSource)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn MergedDictionaries(
&self,
) -> windows_core::Result<windows_collections::IVector<ResourceDictionary>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).MergedDictionaries)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn ThemeDictionaries(
&self,
) -> windows_core::Result<
windows_collections::IMap<windows_core::IInspectable, windows_core::IInspectable>,
> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ThemeDictionaries)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn new() -> windows_core::Result<ResourceDictionary> {
Self::IResourceDictionaryFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateInstance)(
windows_core::Interface::as_raw(this),
core::ptr::null_mut(),
&mut core::ptr::null_mut(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IResourceDictionaryFactory<
R,
F: FnOnce(&IResourceDictionaryFactory) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<
ResourceDictionary,
IResourceDictionaryFactory,
> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for ResourceDictionary {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IResourceDictionary>();
}
unsafe impl windows_core::Interface for ResourceDictionary {
type Vtable = <IResourceDictionary as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IResourceDictionary as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ResourceDictionary {
const NAME: &'static str = "Microsoft.UI.Xaml.ResourceDictionary";
}
unsafe impl Send for ResourceDictionary {}
unsafe impl Sync for ResourceDictionary {}
impl IntoIterator for ResourceDictionary {
type Item =
windows_collections::IKeyValuePair<windows_core::IInspectable, windows_core::IInspectable>;
type IntoIter = windows_collections::IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
IntoIterator::into_iter(&self)
}
}
impl IntoIterator for &ResourceDictionary {
type Item =
windows_collections::IKeyValuePair<windows_core::IInspectable, windows_core::IInspectable>;
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 ResourceManagerRequestedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
ResourceManagerRequestedEventArgs,
windows_core::IUnknown,
windows_core::IInspectable
);
impl ResourceManagerRequestedEventArgs {}
impl windows_core::RuntimeType for ResourceManagerRequestedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IResourceManagerRequestedEventArgs>();
}
unsafe impl windows_core::Interface for ResourceManagerRequestedEventArgs {
type Vtable = <IResourceManagerRequestedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID =
<IResourceManagerRequestedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for ResourceManagerRequestedEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.ResourceManagerRequestedEventArgs";
}
unsafe impl Send for ResourceManagerRequestedEventArgs {}
unsafe impl Sync for ResourceManagerRequestedEventArgs {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RoutedEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
RoutedEventArgs,
windows_core::IUnknown,
windows_core::IInspectable
);
impl RoutedEventArgs {
pub fn OriginalSource(&self) -> windows_core::Result<windows_core::IInspectable> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OriginalSource)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn new() -> windows_core::Result<RoutedEventArgs> {
Self::IRoutedEventArgsFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateInstance)(
windows_core::Interface::as_raw(this),
core::ptr::null_mut(),
&mut core::ptr::null_mut(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
})
}
fn IRoutedEventArgsFactory<
R,
F: FnOnce(&IRoutedEventArgsFactory) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<RoutedEventArgs, IRoutedEventArgsFactory> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for RoutedEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IRoutedEventArgs>();
}
unsafe impl windows_core::Interface for RoutedEventArgs {
type Vtable = <IRoutedEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IRoutedEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for RoutedEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.RoutedEventArgs";
}
unsafe impl Send for RoutedEventArgs {}
unsafe impl Sync for RoutedEventArgs {}
windows_core::imp::define_interface!(
RoutedEventHandler,
RoutedEventHandler_Vtbl,
0xdae23d85_69ca_5bdf_805b_6161a3a215cc
);
impl windows_core::RuntimeType for RoutedEventHandler {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl RoutedEventHandler {
pub fn new<
F: Fn(
windows_core::Ref<windows_core::IInspectable>,
windows_core::Ref<RoutedEventArgs>,
) -> windows_core::Result<()>
+ Send
+ 'static,
>(
invoke: F,
) -> Self {
let com = RoutedEventHandlerBox {
vtable: &RoutedEventHandlerBox::<F>::VTABLE,
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke<P0, P1>(&self, sender: P0, e: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
P1: windows_core::Param<RoutedEventArgs>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Invoke)(
windows_core::Interface::as_raw(this),
sender.param().abi(),
e.param().abi(),
)
.ok()
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct RoutedEventHandler_Vtbl {
base__: windows_core::IUnknown_Vtbl,
Invoke: unsafe extern "system" fn(
this: *mut core::ffi::c_void,
sender: *mut core::ffi::c_void,
e: *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
#[repr(C)]
struct RoutedEventHandlerBox<
F: Fn(
windows_core::Ref<windows_core::IInspectable>,
windows_core::Ref<RoutedEventArgs>,
) -> windows_core::Result<()>
+ Send
+ 'static,
> {
vtable: *const RoutedEventHandler_Vtbl,
invoke: F,
count: windows_core::imp::RefCount,
}
impl<
F: Fn(
windows_core::Ref<windows_core::IInspectable>,
windows_core::Ref<RoutedEventArgs>,
) -> windows_core::Result<()>
+ Send
+ 'static,
> RoutedEventHandlerBox<F>
{
const VTABLE: RoutedEventHandler_Vtbl = RoutedEventHandler_Vtbl {
base__: windows_core::IUnknown_Vtbl {
QueryInterface: Self::QueryInterface,
AddRef: Self::AddRef,
Release: Self::Release,
},
Invoke: Self::Invoke,
};
unsafe extern "system" fn QueryInterface(
this: *mut core::ffi::c_void,
iid: *const windows_core::GUID,
interface: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
if iid.is_null() || interface.is_null() {
return windows_core::HRESULT(-2147467261);
}
*interface = if *iid == <RoutedEventHandler as windows_core::Interface>::IID
|| *iid == <windows_core::IUnknown as windows_core::Interface>::IID
|| *iid == <windows_core::imp::IAgileObject as windows_core::Interface>::IID
{
&mut (*this).vtable as *mut _ as _
} else if *iid == <windows_core::imp::IMarshal as windows_core::Interface>::IID {
(*this).count.add_ref();
return windows_core::imp::marshaler(
core::mem::transmute(&mut (*this).vtable as *mut _ as *mut core::ffi::c_void),
interface,
);
} else {
core::ptr::null_mut()
};
if (*interface).is_null() {
windows_core::HRESULT(-2147467262)
} else {
(*this).count.add_ref();
windows_core::HRESULT(0)
}
}
}
unsafe extern "system" fn AddRef(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
(*this).count.add_ref()
}
}
unsafe extern "system" fn Release(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
}
unsafe extern "system" fn Invoke(
this: *mut core::ffi::c_void,
sender: *mut core::ffi::c_void,
e: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self);
(this.invoke)(
core::mem::transmute_copy(&sender),
core::mem::transmute_copy(&e),
)
.into()
}
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct TextAlignment(pub i32);
impl TextAlignment {
pub const Center: Self = Self(0i32);
pub const Left: Self = Self(1i32);
pub const Start: Self = Self(1i32);
pub const Right: Self = Self(2i32);
pub const End: Self = Self(2i32);
pub const Justify: Self = Self(3i32);
pub const DetectFromContent: Self = Self(4i32);
}
impl windows_core::TypeKind for TextAlignment {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for TextAlignment {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::from_slice(b"enum(Microsoft.UI.Xaml.TextAlignment;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct TextWrapping(pub i32);
impl TextWrapping {
pub const NoWrap: Self = Self(1i32);
pub const Wrap: Self = Self(2i32);
pub const WrapWholeWords: Self = Self(3i32);
}
impl windows_core::TypeKind for TextWrapping {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for TextWrapping {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::from_slice(b"enum(Microsoft.UI.Xaml.TextWrapping;i4)");
}
#[cfg(feature = "UI_Composition")]
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UIElement(windows_core::IUnknown);
#[cfg(feature = "UI_Composition")]
windows_core::imp::interface_hierarchy!(
UIElement,
windows_core::IUnknown,
windows_core::IInspectable
);
#[cfg(feature = "UI_Composition")]
windows_core::imp::required_hierarchy!(
UIElement,
super::Composition::IAnimationObject,
super::Composition::IVisualElement,
super::Composition::IVisualElement2,
DependencyObject
);
#[cfg(feature = "UI_Composition")]
impl UIElement {
pub fn Dispatcher(&self) -> windows_core::Result<windows::UI::Core::CoreDispatcher> {
let this = &windows_core::Interface::cast::<IDependencyObject>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Dispatcher)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI_Dispatching")]
pub fn DispatcherQueue(&self) -> windows_core::Result<super::Dispatching::DispatcherQueue> {
let this = &windows_core::Interface::cast::<IDependencyObject>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DispatcherQueue)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn DesiredSize(&self) -> windows_core::Result<windows::Foundation::Size> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DesiredSize)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn AllowDrop(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AllowDrop)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetAllowDrop(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetAllowDrop)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Opacity(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Opacity)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetOpacity(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetOpacity)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RenderTransformOrigin(&self) -> windows_core::Result<windows::Foundation::Point> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RenderTransformOrigin)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRenderTransformOrigin(
&self,
value: windows::Foundation::Point,
) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRenderTransformOrigin)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsHitTestVisible(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsHitTestVisible)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsHitTestVisible(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsHitTestVisible)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Visibility(&self) -> windows_core::Result<Visibility> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Visibility)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetVisibility(&self, value: Visibility) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetVisibility)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RenderSize(&self) -> windows_core::Result<windows::Foundation::Size> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RenderSize)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn UseLayoutRounding(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UseLayoutRounding)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetUseLayoutRounding(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetUseLayoutRounding)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsTapEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsTapEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsTapEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsTapEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsDoubleTapEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsDoubleTapEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsDoubleTapEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsDoubleTapEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn CanDrag(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CanDrag)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetCanDrag(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetCanDrag)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsRightTapEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsRightTapEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsRightTapEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsRightTapEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsHoldingEnabled(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsHoldingEnabled)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsHoldingEnabled(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsHoldingEnabled)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerCaptures(
&self,
) -> windows_core::Result<windows_collections::IVectorView<Input::Pointer>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerCaptures)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn CanBeScrollAnchor(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CanBeScrollAnchor)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetCanBeScrollAnchor(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetCanBeScrollAnchor)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn ExitDisplayModeOnAccessKeyInvoked(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ExitDisplayModeOnAccessKeyInvoked)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetExitDisplayModeOnAccessKeyInvoked(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetExitDisplayModeOnAccessKeyInvoked)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn IsAccessKeyScope(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsAccessKeyScope)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsAccessKeyScope(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsAccessKeyScope)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AccessKeyScopeOwner(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccessKeyScopeOwner)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetAccessKeyScopeOwner<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetAccessKeyScopeOwner)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn AccessKey(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AccessKey)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn SetAccessKey(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetAccessKey)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(value),
)
.ok()
}
}
pub fn KeyTipHorizontalOffset(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyTipHorizontalOffset)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetKeyTipHorizontalOffset(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetKeyTipHorizontalOffset)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn KeyTipVerticalOffset(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyTipVerticalOffset)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetKeyTipVerticalOffset(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetKeyTipVerticalOffset)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn KeyTipTarget(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyTipTarget)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetKeyTipTarget<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetKeyTipTarget)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn KeyboardAcceleratorPlacementTarget(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).KeyboardAcceleratorPlacementTarget)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetKeyboardAcceleratorPlacementTarget<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetKeyboardAcceleratorPlacementTarget)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn Translation(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Translation)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetTranslation(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetTranslation)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Rotation(&self) -> windows_core::Result<f32> {
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 SetRotation(&self, value: f32) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRotation)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn Scale(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Scale)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetScale(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetScale)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn TransformMatrix(&self) -> windows_core::Result<windows_numerics::Matrix4x4> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TransformMatrix)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetTransformMatrix(
&self,
value: windows_numerics::Matrix4x4,
) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetTransformMatrix)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn CenterPoint(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CenterPoint)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetCenterPoint(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetCenterPoint)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RotationAxis(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RotationAxis)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRotationAxis(&self, value: windows_numerics::Vector3) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRotationAxis)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn ActualOffset(&self) -> windows_core::Result<windows_numerics::Vector3> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualOffset)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn ActualSize(&self) -> windows_core::Result<windows_numerics::Vector2> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ActualSize)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn XamlRoot(&self) -> windows_core::Result<XamlRoot> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XamlRoot)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXamlRoot<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<XamlRoot>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetXamlRoot)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn RasterizationScale(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RasterizationScale)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRasterizationScale(&self, value: f64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRasterizationScale)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn UseSystemFocusVisuals(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UseSystemFocusVisuals)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetUseSystemFocusVisuals(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetUseSystemFocusVisuals)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn XYFocusLeft(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusLeft)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusLeft<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusLeft)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn XYFocusRight(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusRight)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusRight<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusRight)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn XYFocusUp(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusUp)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusUp<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusUp)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn XYFocusDown(&self) -> windows_core::Result<DependencyObject> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).XYFocusDown)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn SetXYFocusDown<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<DependencyObject>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetXYFocusDown)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn IsTabStop(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsTabStop)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetIsTabStop(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetIsTabStop)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn TabIndex(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TabIndex)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetTabIndex(&self, value: i32) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetTabIndex)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RemoveKeyUp(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveKeyUp)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveKeyDown(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveKeyDown)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn GotFocus<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<RoutedEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GotFocus)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveGotFocus(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveGotFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn LostFocus<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<RoutedEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).LostFocus)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveLostFocus(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveLostFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragStarting(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragStarting)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDropCompleted(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDropCompleted)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveCharacterReceived(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveCharacterReceived)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragEnter(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragEnter)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragLeave(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragLeave)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDragOver(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDragOver)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDrop(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDrop)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerPressed<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerPressed)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerPressed(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerPressed)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerMoved<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerMoved)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerMoved(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerMoved)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerReleased<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerReleased)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerReleased(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerReleased)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerEntered<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerEntered)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerEntered(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerEntered)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerExited<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerExited)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerExited(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerExited)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerCaptureLost<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerCaptureLost)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerCaptureLost(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerCaptureLost)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerCanceled<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerCanceled)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerCanceled(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerCanceled)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn PointerWheelChanged<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<Input::PointerEventHandler>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).PointerWheelChanged)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemovePointerWheelChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePointerWheelChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveTapped(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveTapped)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveDoubleTapped(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveDoubleTapped)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveHolding(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveHolding)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveContextRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveContextRequested)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn ContextCanceled<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<windows::Foundation::TypedEventHandler<UIElement, RoutedEventArgs>>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ContextCanceled)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveContextCanceled(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveContextCanceled)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveRightTapped(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveRightTapped)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationStarting(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationStarting)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationInertiaStarting(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationInertiaStarting)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationStarted(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationStarted)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationDelta(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationDelta)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveManipulationCompleted(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveManipulationCompleted)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveAccessKeyDisplayRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveAccessKeyDisplayRequested)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveAccessKeyDisplayDismissed(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveAccessKeyDisplayDismissed)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveAccessKeyInvoked(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveAccessKeyInvoked)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveProcessKeyboardAccelerators(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveProcessKeyboardAccelerators)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveGettingFocus(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveGettingFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveLosingFocus(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveLosingFocus)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveNoFocusCandidateFound(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveNoFocusCandidateFound)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemovePreviewKeyDown(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePreviewKeyDown)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemovePreviewKeyUp(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemovePreviewKeyUp)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveBringIntoViewRequested(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveBringIntoViewRequested)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn Measure(&self, availablesize: windows::Foundation::Size) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Measure)(
windows_core::Interface::as_raw(this),
availablesize,
)
.ok()
}
}
pub fn Arrange(&self, finalrect: windows::Foundation::Rect) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Arrange)(
windows_core::Interface::as_raw(this),
finalrect,
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn CapturePointer<P0>(&self, value: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<Input::Pointer>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CapturePointer)(
windows_core::Interface::as_raw(this),
value.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn ReleasePointerCapture<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<Input::Pointer>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).ReleasePointerCapture)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn ReleasePointerCaptures(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).ReleasePointerCaptures)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn InvalidateMeasure(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).InvalidateMeasure)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn InvalidateArrange(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).InvalidateArrange)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn UpdateLayout(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).UpdateLayout)(windows_core::Interface::as_raw(
this,
))
.ok()
}
}
pub fn CancelDirectManipulations(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CancelDirectManipulations)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "UI_Input")]
pub fn StartDragAsync<P0>(
&self,
pointerpoint: P0,
) -> windows_core::Result<
windows_future::IAsyncOperation<
windows::ApplicationModel::DataTransfer::DataPackageOperation,
>,
>
where
P0: windows_core::Param<super::Input::PointerPoint>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartDragAsync)(
windows_core::Interface::as_raw(this),
pointerpoint.param().abi(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StartBringIntoView(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).StartBringIntoView)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn OnDisconnectVisualChildren(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IUIElementOverrides>(self)?;
unsafe {
(windows_core::Interface::vtable(this).OnDisconnectVisualChildren)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn FindSubElementsForTouchTargeting(
&self,
point: windows::Foundation::Point,
boundingrect: windows::Foundation::Rect,
) -> windows_core::Result<
windows_collections::IIterable<windows_collections::IIterable<windows::Foundation::Point>>,
> {
let this = &windows_core::Interface::cast::<IUIElementOverrides>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindSubElementsForTouchTargeting)(
windows_core::Interface::as_raw(this),
point,
boundingrect,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetChildrenInTabFocusOrder(
&self,
) -> windows_core::Result<windows_collections::IIterable<DependencyObject>> {
let this = &windows_core::Interface::cast::<IUIElementOverrides>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetChildrenInTabFocusOrder)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI_Xaml_Input")]
pub fn TryStartDirectManipulation<P0>(value: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<Input::Pointer>,
{
Self::IUIElementStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TryStartDirectManipulation)(
windows_core::Interface::as_raw(this),
value.param().abi(),
&mut result__,
)
.map(|| result__)
})
}
pub fn RegisterAsScrollPort<P0>(element: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<UIElement>,
{
Self::IUIElementStatics(|this| unsafe {
(windows_core::Interface::vtable(this).RegisterAsScrollPort)(
windows_core::Interface::as_raw(this),
element.param().abi(),
)
.ok()
})
}
fn IUIElementStatics<R, F: FnOnce(&IUIElementStatics) -> windows_core::Result<R>>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<UIElement, IUIElementStatics> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
#[cfg(feature = "UI_Composition")]
impl windows_core::RuntimeType for UIElement {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IUIElement>();
}
#[cfg(feature = "UI_Composition")]
unsafe impl windows_core::Interface for UIElement {
type Vtable = <IUIElement as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUIElement as windows_core::Interface>::IID;
}
#[cfg(feature = "UI_Composition")]
impl windows_core::RuntimeName for UIElement {
const NAME: &'static str = "Microsoft.UI.Xaml.UIElement";
}
#[cfg(feature = "UI_Composition")]
unsafe impl Send for UIElement {}
#[cfg(feature = "UI_Composition")]
unsafe impl Sync for UIElement {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UnhandledExceptionEventArgs(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
UnhandledExceptionEventArgs,
windows_core::IUnknown,
windows_core::IInspectable
);
impl UnhandledExceptionEventArgs {
pub fn Exception(&self) -> windows_core::Result<windows_core::HRESULT> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Exception)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn Message(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Message)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
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()
}
}
}
impl windows_core::RuntimeType for UnhandledExceptionEventArgs {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IUnhandledExceptionEventArgs>();
}
unsafe impl windows_core::Interface for UnhandledExceptionEventArgs {
type Vtable = <IUnhandledExceptionEventArgs as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IUnhandledExceptionEventArgs as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for UnhandledExceptionEventArgs {
const NAME: &'static str = "Microsoft.UI.Xaml.UnhandledExceptionEventArgs";
}
unsafe impl Send for UnhandledExceptionEventArgs {}
unsafe impl Sync for UnhandledExceptionEventArgs {}
windows_core::imp::define_interface!(
UnhandledExceptionEventHandler,
UnhandledExceptionEventHandler_Vtbl,
0x3427c1b6_5eca_5631_84b8_5bae732fb67f
);
impl windows_core::RuntimeType for UnhandledExceptionEventHandler {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl UnhandledExceptionEventHandler {
pub fn new<
F: Fn(
windows_core::Ref<windows_core::IInspectable>,
windows_core::Ref<UnhandledExceptionEventArgs>,
) -> windows_core::Result<()>
+ Send
+ 'static,
>(
invoke: F,
) -> Self {
let com = UnhandledExceptionEventHandlerBox {
vtable: &UnhandledExceptionEventHandlerBox::<F>::VTABLE,
count: windows_core::imp::RefCount::new(1),
invoke,
};
unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) }
}
pub fn Invoke<P0, P1>(&self, sender: P0, e: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IInspectable>,
P1: windows_core::Param<UnhandledExceptionEventArgs>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Invoke)(
windows_core::Interface::as_raw(this),
sender.param().abi(),
e.param().abi(),
)
.ok()
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct UnhandledExceptionEventHandler_Vtbl {
base__: windows_core::IUnknown_Vtbl,
Invoke: unsafe extern "system" fn(
this: *mut core::ffi::c_void,
sender: *mut core::ffi::c_void,
e: *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
#[repr(C)]
struct UnhandledExceptionEventHandlerBox<
F: Fn(
windows_core::Ref<windows_core::IInspectable>,
windows_core::Ref<UnhandledExceptionEventArgs>,
) -> windows_core::Result<()>
+ Send
+ 'static,
> {
vtable: *const UnhandledExceptionEventHandler_Vtbl,
invoke: F,
count: windows_core::imp::RefCount,
}
impl<
F: Fn(
windows_core::Ref<windows_core::IInspectable>,
windows_core::Ref<UnhandledExceptionEventArgs>,
) -> windows_core::Result<()>
+ Send
+ 'static,
> UnhandledExceptionEventHandlerBox<F>
{
const VTABLE: UnhandledExceptionEventHandler_Vtbl = UnhandledExceptionEventHandler_Vtbl {
base__: windows_core::IUnknown_Vtbl {
QueryInterface: Self::QueryInterface,
AddRef: Self::AddRef,
Release: Self::Release,
},
Invoke: Self::Invoke,
};
unsafe extern "system" fn QueryInterface(
this: *mut core::ffi::c_void,
iid: *const windows_core::GUID,
interface: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
if iid.is_null() || interface.is_null() {
return windows_core::HRESULT(-2147467261);
}
*interface = if *iid == <UnhandledExceptionEventHandler as windows_core::Interface>::IID
|| *iid == <windows_core::IUnknown as windows_core::Interface>::IID
|| *iid == <windows_core::imp::IAgileObject as windows_core::Interface>::IID
{
&mut (*this).vtable as *mut _ as _
} else if *iid == <windows_core::imp::IMarshal as windows_core::Interface>::IID {
(*this).count.add_ref();
return windows_core::imp::marshaler(
core::mem::transmute(&mut (*this).vtable as *mut _ as *mut core::ffi::c_void),
interface,
);
} else {
core::ptr::null_mut()
};
if (*interface).is_null() {
windows_core::HRESULT(-2147467262)
} else {
(*this).count.add_ref();
windows_core::HRESULT(0)
}
}
}
unsafe extern "system" fn AddRef(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
(*this).count.add_ref()
}
}
unsafe extern "system" fn Release(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this = this as *mut *mut core::ffi::c_void as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
let _ = windows_core::imp::Box::from_raw(this);
}
remaining
}
}
unsafe extern "system" fn Invoke(
this: *mut core::ffi::c_void,
sender: *mut core::ffi::c_void,
e: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self);
(this.invoke)(
core::mem::transmute_copy(&sender),
core::mem::transmute_copy(&e),
)
.into()
}
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct VerticalAlignment(pub i32);
impl VerticalAlignment {
pub const Top: Self = Self(0i32);
pub const Center: Self = Self(1i32);
pub const Bottom: Self = Self(2i32);
pub const Stretch: Self = Self(3i32);
}
impl windows_core::TypeKind for VerticalAlignment {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for VerticalAlignment {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::from_slice(b"enum(Microsoft.UI.Xaml.VerticalAlignment;i4)");
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct Visibility(pub i32);
impl Visibility {
pub const Visible: Self = Self(0i32);
pub const Collapsed: Self = Self(1i32);
}
impl windows_core::TypeKind for Visibility {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for Visibility {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::from_slice(b"enum(Microsoft.UI.Xaml.Visibility;i4)");
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Window(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(Window, windows_core::IUnknown, windows_core::IInspectable);
impl Window {
pub fn Bounds(&self) -> windows_core::Result<windows::Foundation::Rect> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Bounds)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn Visible(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Visible)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "UI_Composition")]
pub fn Content(&self) -> windows_core::Result<UIElement> {
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__))
}
}
#[cfg(feature = "UI_Composition")]
pub fn SetContent<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<UIElement>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetContent)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
pub fn CoreWindow(&self) -> windows_core::Result<windows::UI::Core::CoreWindow> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CoreWindow)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Dispatcher(&self) -> windows_core::Result<windows::UI::Core::CoreDispatcher> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Dispatcher)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI_Dispatching")]
pub fn DispatcherQueue(&self) -> windows_core::Result<super::Dispatching::DispatcherQueue> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).DispatcherQueue)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
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 ExtendsContentIntoTitleBar(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ExtendsContentIntoTitleBar)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetExtendsContentIntoTitleBar(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetExtendsContentIntoTitleBar)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RemoveActivated(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveActivated)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveClosed(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveClosed)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveSizeChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveSizeChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn RemoveVisibilityChanged(&self, token: i64) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).RemoveVisibilityChanged)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
pub fn Activate(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Activate)(windows_core::Interface::as_raw(this))
.ok()
}
}
pub fn Close(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this))
.ok()
}
}
#[cfg(feature = "UI_Composition")]
pub fn SetTitleBar<P0>(&self, titlebar: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<UIElement>,
{
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetTitleBar)(
windows_core::Interface::as_raw(this),
titlebar.param().abi(),
)
.ok()
}
}
#[cfg(feature = "UI_Xaml_Media")]
pub fn SystemBackdrop(&self) -> windows_core::Result<Media::SystemBackdrop> {
let this = &windows_core::Interface::cast::<IWindow2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).SystemBackdrop)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "UI_Xaml_Media")]
pub fn SetSystemBackdrop<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<Media::SystemBackdrop>,
{
let this = &windows_core::Interface::cast::<IWindow2>(self)?;
unsafe {
(windows_core::Interface::vtable(this).SetSystemBackdrop)(
windows_core::Interface::as_raw(this),
value.param().abi(),
)
.ok()
}
}
#[cfg(feature = "UI_Windowing")]
pub fn AppWindow(&self) -> windows_core::Result<super::Windowing::AppWindow> {
let this = &windows_core::Interface::cast::<IWindow2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AppWindow)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn new() -> windows_core::Result<Window> {
Self::IWindowFactory(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).CreateInstance)(
windows_core::Interface::as_raw(this),
core::ptr::null_mut(),
&mut core::ptr::null_mut(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
})
}
pub fn Current() -> windows_core::Result<Window> {
Self::IWindowStatics(|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 IWindowFactory<R, F: FnOnce(&IWindowFactory) -> windows_core::Result<R>>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<Window, IWindowFactory> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
fn IWindowStatics<R, F: FnOnce(&IWindowStatics) -> windows_core::Result<R>>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<Window, IWindowStatics> =
windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl windows_core::RuntimeType for Window {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IWindow>();
}
unsafe impl windows_core::Interface for Window {
type Vtable = <IWindow as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IWindow as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for Window {
const NAME: &'static str = "Microsoft.UI.Xaml.Window";
}
unsafe impl Send for Window {}
unsafe impl Sync for Window {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct XamlRoot(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
XamlRoot,
windows_core::IUnknown,
windows_core::IInspectable
);
impl XamlRoot {
#[cfg(feature = "UI_Composition")]
pub fn Content(&self) -> windows_core::Result<UIElement> {
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 Size(&self) -> windows_core::Result<windows::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 RasterizationScale(&self) -> windows_core::Result<f64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RasterizationScale)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn IsHostVisible(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsHostVisible)(
windows_core::Interface::as_raw(this),
&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()
}
}
}
impl windows_core::RuntimeType for XamlRoot {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IXamlRoot>();
}
unsafe impl windows_core::Interface for XamlRoot {
type Vtable = <IXamlRoot as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IXamlRoot as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for XamlRoot {
const NAME: &'static str = "Microsoft.UI.Xaml.XamlRoot";
}
unsafe impl Send for XamlRoot {}
unsafe impl Sync for XamlRoot {}