blob: ac52f199a1e472a91db26ba7664c34aebb59b399 [file] [log] [blame] [edit]
// Bindings generated by `windows-bindgen` 0.51.1
#![allow(
non_snake_case,
non_upper_case_globals,
non_camel_case_types,
dead_code,
clippy::all
)]
pub mod Foundation {
pub mod Collections {
#[repr(transparent)]
pub struct IIterable<T>(::windows_core::IUnknown, ::core::marker::PhantomData<T>)
where
T: ::windows_core::RuntimeType + 'static;
impl<T: ::windows_core::RuntimeType + 'static> IIterable<T> {
pub fn First(&self) -> ::windows_core::Result<IIterator<T>> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).First)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
}
impl<T: ::windows_core::RuntimeType + 'static>
::windows_core::CanInto<::windows_core::IUnknown> for IIterable<T>
{
}
impl<T: ::windows_core::RuntimeType + 'static>
::windows_core::CanInto<::windows_core::IInspectable> for IIterable<T>
{
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::cmp::PartialEq for IIterable<T> {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::cmp::Eq for IIterable<T> {}
impl<T: ::windows_core::RuntimeType + 'static> ::core::fmt::Debug for IIterable<T> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IIterable").field(&self.0).finish()
}
}
impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::RuntimeType for IIterable<T> {
const SIGNATURE: ::windows_core::imp::ConstBuffer = {
::windows_core::imp::ConstBuffer::new()
.push_slice(b"pinterface(")
.push_slice(b"{faa585ea-6214-4217-afda-7f46de5869b3}")
.push_slice(b";")
.push_other(<T as ::windows_core::RuntimeType>::SIGNATURE)
.push_slice(b")")
};
}
impl<T: ::windows_core::RuntimeType> ::core::iter::IntoIterator for IIterable<T> {
type Item = T;
type IntoIter = IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
::core::iter::IntoIterator::into_iter(&self)
}
}
impl<T: ::windows_core::RuntimeType> ::core::iter::IntoIterator for &IIterable<T> {
type Item = T;
type IntoIter = IIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
self.First().unwrap()
}
}
unsafe impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::Interface for IIterable<T> {
type Vtable = IIterable_Vtbl<T>;
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::clone::Clone for IIterable<T> {
fn clone(&self) -> Self {
Self(self.0.clone(), ::core::marker::PhantomData::<T>)
}
}
unsafe impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::ComInterface
for IIterable<T>
{
const IID: ::windows_core::GUID = ::windows_core::GUID::from_signature(
<Self as ::windows_core::RuntimeType>::SIGNATURE,
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IIterable_Vtbl<T>
where
T: ::windows_core::RuntimeType + 'static,
{
pub base__: ::windows_core::IInspectable_Vtbl,
pub First: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut *mut ::core::ffi::c_void,
) -> ::windows_core::HRESULT,
pub T: ::core::marker::PhantomData<T>,
}
#[repr(transparent)]
pub struct IIterator<T>(::windows_core::IUnknown, ::core::marker::PhantomData<T>)
where
T: ::windows_core::RuntimeType + 'static;
impl<T: ::windows_core::RuntimeType + 'static> IIterator<T> {
pub fn Current(&self) -> ::windows_core::Result<T> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Current)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn HasCurrent(&self) -> ::windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).HasCurrent)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn MoveNext(&self) -> ::windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MoveNext)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn GetMany(
&self,
items: &mut [<T as ::windows_core::Type<T>>::Default],
) -> ::windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).GetMany)(
::windows_core::Interface::as_raw(this),
items.len() as u32,
::core::mem::transmute_copy(&items),
&mut result__,
)
.from_abi(result__)
}
}
}
impl<T: ::windows_core::RuntimeType + 'static>
::windows_core::CanInto<::windows_core::IUnknown> for IIterator<T>
{
}
impl<T: ::windows_core::RuntimeType + 'static>
::windows_core::CanInto<::windows_core::IInspectable> for IIterator<T>
{
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::cmp::PartialEq for IIterator<T> {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::cmp::Eq for IIterator<T> {}
impl<T: ::windows_core::RuntimeType + 'static> ::core::fmt::Debug for IIterator<T> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IIterator").field(&self.0).finish()
}
}
impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::RuntimeType for IIterator<T> {
const SIGNATURE: ::windows_core::imp::ConstBuffer = {
::windows_core::imp::ConstBuffer::new()
.push_slice(b"pinterface(")
.push_slice(b"{6a79e863-4300-459a-9966-cbb660963ee1}")
.push_slice(b";")
.push_other(<T as ::windows_core::RuntimeType>::SIGNATURE)
.push_slice(b")")
};
}
impl<T: ::windows_core::RuntimeType> ::core::iter::Iterator for IIterator<T> {
type Item = T;
fn next(&mut self) -> ::core::option::Option<Self::Item> {
let result = self.Current().ok();
if result.is_some() {
self.MoveNext().ok()?;
}
result
}
}
unsafe impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::Interface for IIterator<T> {
type Vtable = IIterator_Vtbl<T>;
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::clone::Clone for IIterator<T> {
fn clone(&self) -> Self {
Self(self.0.clone(), ::core::marker::PhantomData::<T>)
}
}
unsafe impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::ComInterface
for IIterator<T>
{
const IID: ::windows_core::GUID = ::windows_core::GUID::from_signature(
<Self as ::windows_core::RuntimeType>::SIGNATURE,
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IIterator_Vtbl<T>
where
T: ::windows_core::RuntimeType + 'static,
{
pub base__: ::windows_core::IInspectable_Vtbl,
pub Current: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::windows_core::AbiType<T>,
) -> ::windows_core::HRESULT,
pub HasCurrent: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut bool,
) -> ::windows_core::HRESULT,
pub MoveNext: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut bool,
) -> ::windows_core::HRESULT,
pub GetMany: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
items_array_size: u32,
items: *mut ::windows_core::AbiType<T>,
result__: *mut u32,
) -> ::windows_core::HRESULT,
pub T: ::core::marker::PhantomData<T>,
}
#[repr(transparent)]
pub struct IVectorView<T>(::windows_core::IUnknown, ::core::marker::PhantomData<T>)
where
T: ::windows_core::RuntimeType + 'static;
impl<T: ::windows_core::RuntimeType + 'static> IVectorView<T> {
pub fn GetAt(&self, index: u32) -> ::windows_core::Result<T> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).GetAt)(
::windows_core::Interface::as_raw(this),
index,
&mut result__,
)
.from_abi(result__)
}
}
pub fn Size(&self) -> ::windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Size)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn IndexOf<P0>(&self, value: P0, index: &mut u32) -> ::windows_core::Result<bool>
where
P0: ::windows_core::IntoParam<T>,
{
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).IndexOf)(
::windows_core::Interface::as_raw(this),
value.into_param().abi(),
index,
&mut result__,
)
.from_abi(result__)
}
}
pub fn GetMany(
&self,
startindex: u32,
items: &mut [<T as ::windows_core::Type<T>>::Default],
) -> ::windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).GetMany)(
::windows_core::Interface::as_raw(this),
startindex,
items.len() as u32,
::core::mem::transmute_copy(&items),
&mut result__,
)
.from_abi(result__)
}
}
pub fn First(&self) -> ::windows_core::Result<IIterator<T>> {
let this = &::windows_core::ComInterface::cast::<IIterable<T>>(self)?;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).First)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
}
impl<T: ::windows_core::RuntimeType + 'static>
::windows_core::CanInto<::windows_core::IUnknown> for IVectorView<T>
{
}
impl<T: ::windows_core::RuntimeType + 'static>
::windows_core::CanInto<::windows_core::IInspectable> for IVectorView<T>
{
}
impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::CanTryInto<IIterable<T>>
for IVectorView<T>
{
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::cmp::PartialEq for IVectorView<T> {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::cmp::Eq for IVectorView<T> {}
impl<T: ::windows_core::RuntimeType + 'static> ::core::fmt::Debug for IVectorView<T> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IVectorView").field(&self.0).finish()
}
}
impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::RuntimeType for IVectorView<T> {
const SIGNATURE: ::windows_core::imp::ConstBuffer = {
::windows_core::imp::ConstBuffer::new()
.push_slice(b"pinterface(")
.push_slice(b"{bbe1fa4c-b0e3-4583-baef-1f1b2e483e56}")
.push_slice(b";")
.push_other(<T as ::windows_core::RuntimeType>::SIGNATURE)
.push_slice(b")")
};
}
pub struct VectorViewIterator<T: ::windows_core::RuntimeType + 'static> {
vector: ::core::option::Option<IVectorView<T>>,
current: u32,
}
impl<T: ::windows_core::RuntimeType> VectorViewIterator<T> {
pub fn new(vector: ::core::option::Option<IVectorView<T>>) -> Self {
Self { vector, current: 0 }
}
}
impl<T: ::windows_core::RuntimeType> ::core::iter::Iterator for VectorViewIterator<T> {
type Item = T;
fn next(&mut self) -> ::core::option::Option<Self::Item> {
self.vector
.as_ref()
.and_then(|vector| vector.GetAt(self.current).ok())
.and_then(|result| {
self.current += 1;
Some(result)
})
}
}
impl<T: ::windows_core::RuntimeType> ::core::iter::IntoIterator for IVectorView<T> {
type Item = T;
type IntoIter = VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
::core::iter::IntoIterator::into_iter(&self)
}
}
impl<T: ::windows_core::RuntimeType> ::core::iter::IntoIterator for &IVectorView<T> {
type Item = T;
type IntoIter = VectorViewIterator<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
VectorViewIterator::new(::core::option::Option::Some(::core::clone::Clone::clone(
self,
)))
}
}
unsafe impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::Interface for IVectorView<T> {
type Vtable = IVectorView_Vtbl<T>;
}
impl<T: ::windows_core::RuntimeType + 'static> ::core::clone::Clone for IVectorView<T> {
fn clone(&self) -> Self {
Self(self.0.clone(), ::core::marker::PhantomData::<T>)
}
}
unsafe impl<T: ::windows_core::RuntimeType + 'static> ::windows_core::ComInterface
for IVectorView<T>
{
const IID: ::windows_core::GUID = ::windows_core::GUID::from_signature(
<Self as ::windows_core::RuntimeType>::SIGNATURE,
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IVectorView_Vtbl<T>
where
T: ::windows_core::RuntimeType + 'static,
{
pub base__: ::windows_core::IInspectable_Vtbl,
pub GetAt: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
index: u32,
result__: *mut ::windows_core::AbiType<T>,
) -> ::windows_core::HRESULT,
pub Size: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut u32,
) -> ::windows_core::HRESULT,
pub IndexOf: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::windows_core::AbiType<T>,
index: *mut u32,
result__: *mut bool,
) -> ::windows_core::HRESULT,
pub GetMany: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
startindex: u32,
items_array_size: u32,
items: *mut ::windows_core::AbiType<T>,
result__: *mut u32,
) -> ::windows_core::HRESULT,
pub T: ::core::marker::PhantomData<T>,
}
}
#[repr(C)]
pub struct DateTime {
pub UniversalTime: i64,
}
impl ::core::marker::Copy for DateTime {}
impl ::core::clone::Clone for DateTime {
fn clone(&self) -> Self {
*self
}
}
impl ::core::fmt::Debug for DateTime {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("DateTime")
.field("UniversalTime", &self.UniversalTime)
.finish()
}
}
impl ::windows_core::TypeKind for DateTime {
type TypeKind = ::windows_core::CopyType;
}
impl ::windows_core::RuntimeType for DateTime {
const SIGNATURE: ::windows_core::imp::ConstBuffer =
::windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Foundation.DateTime;i8)");
}
impl ::core::cmp::PartialEq for DateTime {
fn eq(&self, other: &Self) -> bool {
self.UniversalTime == other.UniversalTime
}
}
impl ::core::cmp::Eq for DateTime {}
impl ::core::default::Default for DateTime {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
pub struct TimeSpan {
pub Duration: i64,
}
impl ::core::marker::Copy for TimeSpan {}
impl ::core::clone::Clone for TimeSpan {
fn clone(&self) -> Self {
*self
}
}
impl ::core::fmt::Debug for TimeSpan {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("TimeSpan")
.field("Duration", &self.Duration)
.finish()
}
}
impl ::windows_core::TypeKind for TimeSpan {
type TypeKind = ::windows_core::CopyType;
}
impl ::windows_core::RuntimeType for TimeSpan {
const SIGNATURE: ::windows_core::imp::ConstBuffer =
::windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Foundation.TimeSpan;i8)");
}
impl ::core::cmp::PartialEq for TimeSpan {
fn eq(&self, other: &Self) -> bool {
self.Duration == other.Duration
}
}
impl ::core::cmp::Eq for TimeSpan {}
impl ::core::default::Default for TimeSpan {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::convert::From<::core::time::Duration> for TimeSpan {
fn from(value: ::core::time::Duration) -> Self {
Self {
Duration: (value.as_nanos() / 100) as i64,
}
}
}
impl ::core::convert::From<TimeSpan> for ::core::time::Duration {
fn from(value: TimeSpan) -> Self {
::core::time::Duration::from_nanos((value.Duration * 100) as u64)
}
}
}
pub mod Globalization {
#[doc(hidden)]
#[repr(transparent)]
pub struct ICalendar(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for ICalendar {
type Vtable = ICalendar_Vtbl;
}
impl ::core::clone::Clone for ICalendar {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
unsafe impl ::windows_core::ComInterface for ICalendar {
const IID: ::windows_core::GUID =
::windows_core::GUID::from_u128(0xca30221d_86d9_40fb_a26b_d44eb7cf08ea);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICalendar_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub Clone: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut *mut ::core::ffi::c_void,
) -> ::windows_core::HRESULT,
pub SetToMin:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
pub SetToMax:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
pub Languages: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut *mut ::core::ffi::c_void,
) -> ::windows_core::HRESULT,
pub NumeralSystem: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub SetNumeralSystem: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub GetCalendarSystem: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub ChangeCalendarSystem: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub GetClock: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub ChangeClock: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub GetDateTime: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut super::Foundation::DateTime,
) -> ::windows_core::HRESULT,
pub SetDateTime: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: super::Foundation::DateTime,
) -> ::windows_core::HRESULT,
pub SetToNow:
unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
pub FirstEra: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastEra: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfEras: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub Era: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetEra: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddEras: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
eras: i32,
) -> ::windows_core::HRESULT,
pub EraAsFullString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub EraAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ideallength: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub FirstYearInThisEra: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastYearInThisEra: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfYearsInThisEra: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub Year: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetYear: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddYears: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
years: i32,
) -> ::windows_core::HRESULT,
pub YearAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub YearAsTruncatedString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
remainingdigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub YearAsPaddedString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mindigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub FirstMonthInThisYear: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastMonthInThisYear: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfMonthsInThisYear: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub Month: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetMonth: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddMonths: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
months: i32,
) -> ::windows_core::HRESULT,
pub MonthAsFullString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub MonthAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ideallength: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub MonthAsFullSoloString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub MonthAsSoloString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ideallength: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub MonthAsNumericString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub MonthAsPaddedNumericString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mindigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
)
-> ::windows_core::HRESULT,
pub AddWeeks: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
weeks: i32,
) -> ::windows_core::HRESULT,
pub FirstDayInThisMonth: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastDayInThisMonth: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfDaysInThisMonth: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub Day: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetDay: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddDays: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
days: i32,
) -> ::windows_core::HRESULT,
pub DayAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub DayAsPaddedString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mindigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub DayOfWeek: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut DayOfWeek,
) -> ::windows_core::HRESULT,
pub DayOfWeekAsFullString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub DayOfWeekAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ideallength: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub DayOfWeekAsFullSoloString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
)
-> ::windows_core::HRESULT,
pub DayOfWeekAsSoloString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ideallength: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub FirstPeriodInThisDay: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastPeriodInThisDay: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfPeriodsInThisDay: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub Period: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetPeriod: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddPeriods: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
periods: i32,
) -> ::windows_core::HRESULT,
pub PeriodAsFullString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub PeriodAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ideallength: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub FirstHourInThisPeriod: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastHourInThisPeriod: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfHoursInThisPeriod: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
)
-> ::windows_core::HRESULT,
pub Hour: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetHour: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddHours: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
hours: i32,
) -> ::windows_core::HRESULT,
pub HourAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub HourAsPaddedString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mindigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub Minute: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetMinute: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddMinutes: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
minutes: i32,
) -> ::windows_core::HRESULT,
pub MinuteAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub MinuteAsPaddedString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mindigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub Second: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetSecond: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddSeconds: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
seconds: i32,
) -> ::windows_core::HRESULT,
pub SecondAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub SecondAsPaddedString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mindigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub Nanosecond: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub SetNanosecond: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
value: i32,
) -> ::windows_core::HRESULT,
pub AddNanoseconds: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
nanoseconds: i32,
) -> ::windows_core::HRESULT,
pub NanosecondAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub NanosecondAsPaddedString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
mindigits: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub Compare: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
other: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub CompareDateTime: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
other: super::Foundation::DateTime,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub CopyTo: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
other: *mut ::core::ffi::c_void,
) -> ::windows_core::HRESULT,
pub FirstMinuteInThisHour: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastMinuteInThisHour: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfMinutesInThisHour: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
)
-> ::windows_core::HRESULT,
pub FirstSecondInThisMinute: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub LastSecondInThisMinute: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
) -> ::windows_core::HRESULT,
pub NumberOfSecondsInThisMinute: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut i32,
)
-> ::windows_core::HRESULT,
pub ResolvedLanguage: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub IsDaylightSavingTime: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut bool,
) -> ::windows_core::HRESULT,
}
#[doc(hidden)]
#[repr(transparent)]
pub struct ICalendarFactory(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for ICalendarFactory {
type Vtable = ICalendarFactory_Vtbl;
}
impl ::core::clone::Clone for ICalendarFactory {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
unsafe impl ::windows_core::ComInterface for ICalendarFactory {
const IID: ::windows_core::GUID =
::windows_core::GUID::from_u128(0x83f58412_e56b_4c75_a66e_0f63d57758a6);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICalendarFactory_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub CreateCalendarDefaultCalendarAndClock:
unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
languages: *mut ::core::ffi::c_void,
result__: *mut *mut ::core::ffi::c_void,
) -> ::windows_core::HRESULT,
pub CreateCalendar: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
languages: *mut ::core::ffi::c_void,
calendar: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
clock: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
result__: *mut *mut ::core::ffi::c_void,
) -> ::windows_core::HRESULT,
}
#[doc(hidden)]
#[repr(transparent)]
pub struct ICalendarFactory2(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for ICalendarFactory2 {
type Vtable = ICalendarFactory2_Vtbl;
}
impl ::core::clone::Clone for ICalendarFactory2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
unsafe impl ::windows_core::ComInterface for ICalendarFactory2 {
const IID: ::windows_core::GUID =
::windows_core::GUID::from_u128(0xb44b378c_ca7e_4590_9e72_ea2bec1a5115);
}
#[repr(C)]
#[doc(hidden)]
pub struct ICalendarFactory2_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub CreateCalendarWithTimeZone: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
languages: *mut ::core::ffi::c_void,
calendar: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
clock: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
timezoneid: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
result__: *mut *mut ::core::ffi::c_void,
)
-> ::windows_core::HRESULT,
}
#[doc(hidden)]
#[repr(transparent)]
pub struct ITimeZoneOnCalendar(::windows_core::IUnknown);
unsafe impl ::windows_core::Interface for ITimeZoneOnCalendar {
type Vtable = ITimeZoneOnCalendar_Vtbl;
}
impl ::core::clone::Clone for ITimeZoneOnCalendar {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
unsafe impl ::windows_core::ComInterface for ITimeZoneOnCalendar {
const IID: ::windows_core::GUID =
::windows_core::GUID::from_u128(0xbb3c25e5_46cf_4317_a3f5_02621ad54478);
}
#[repr(C)]
#[doc(hidden)]
pub struct ITimeZoneOnCalendar_Vtbl {
pub base__: ::windows_core::IInspectable_Vtbl,
pub GetTimeZone: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub ChangeTimeZone: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
timezoneid: ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub TimeZoneAsFullString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
pub TimeZoneAsString: unsafe extern "system" fn(
this: *mut ::core::ffi::c_void,
ideallength: i32,
result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>,
) -> ::windows_core::HRESULT,
}
#[repr(transparent)]
pub struct Calendar(::windows_core::IUnknown);
impl Calendar {
pub fn new() -> ::windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<
R,
F: FnOnce(&::windows_core::imp::IGenericFactory) -> ::windows_core::Result<R>,
>(
callback: F,
) -> ::windows_core::Result<R> {
static SHARED: ::windows_core::imp::FactoryCache<
Calendar,
::windows_core::imp::IGenericFactory,
> = ::windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Clone(&self) -> ::windows_core::Result<Calendar> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Clone)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetToMin(&self) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetToMin)(
::windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn SetToMax(&self) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetToMax)(
::windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn Languages(
&self,
) -> ::windows_core::Result<
super::Foundation::Collections::IVectorView<::windows_core::HSTRING>,
> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Languages)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumeralSystem(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumeralSystem)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetNumeralSystem(
&self,
value: &::windows_core::HSTRING,
) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetNumeralSystem)(
::windows_core::Interface::as_raw(this),
::core::mem::transmute_copy(value),
)
.ok()
}
}
pub fn GetCalendarSystem(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).GetCalendarSystem)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn ChangeCalendarSystem(
&self,
value: &::windows_core::HSTRING,
) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).ChangeCalendarSystem)(
::windows_core::Interface::as_raw(this),
::core::mem::transmute_copy(value),
)
.ok()
}
}
pub fn GetClock(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).GetClock)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn ChangeClock(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).ChangeClock)(
::windows_core::Interface::as_raw(this),
::core::mem::transmute_copy(value),
)
.ok()
}
}
pub fn GetDateTime(&self) -> ::windows_core::Result<super::Foundation::DateTime> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).GetDateTime)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetDateTime(
&self,
value: super::Foundation::DateTime,
) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetDateTime)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn SetToNow(&self) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetToNow)(
::windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn FirstEra(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstEra)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastEra(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastEra)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfEras(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfEras)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn Era(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Era)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetEra(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetEra)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddEras(&self, eras: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddEras)(
::windows_core::Interface::as_raw(this),
eras,
)
.ok()
}
}
pub fn EraAsFullString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).EraAsFullString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn EraAsString(
&self,
ideallength: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).EraAsString)(
::windows_core::Interface::as_raw(this),
ideallength,
&mut result__,
)
.from_abi(result__)
}
}
pub fn FirstYearInThisEra(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstYearInThisEra)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastYearInThisEra(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastYearInThisEra)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfYearsInThisEra(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfYearsInThisEra)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn Year(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Year)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetYear(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetYear)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddYears(&self, years: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddYears)(
::windows_core::Interface::as_raw(this),
years,
)
.ok()
}
}
pub fn YearAsString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).YearAsString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn YearAsTruncatedString(
&self,
remainingdigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).YearAsTruncatedString)(
::windows_core::Interface::as_raw(this),
remainingdigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn YearAsPaddedString(
&self,
mindigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).YearAsPaddedString)(
::windows_core::Interface::as_raw(this),
mindigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn FirstMonthInThisYear(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstMonthInThisYear)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastMonthInThisYear(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastMonthInThisYear)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfMonthsInThisYear(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfMonthsInThisYear)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn Month(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Month)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetMonth(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetMonth)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddMonths(&self, months: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddMonths)(
::windows_core::Interface::as_raw(this),
months,
)
.ok()
}
}
pub fn MonthAsFullString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MonthAsFullString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn MonthAsString(
&self,
ideallength: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MonthAsString)(
::windows_core::Interface::as_raw(this),
ideallength,
&mut result__,
)
.from_abi(result__)
}
}
pub fn MonthAsFullSoloString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MonthAsFullSoloString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn MonthAsSoloString(
&self,
ideallength: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MonthAsSoloString)(
::windows_core::Interface::as_raw(this),
ideallength,
&mut result__,
)
.from_abi(result__)
}
}
pub fn MonthAsNumericString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MonthAsNumericString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn MonthAsPaddedNumericString(
&self,
mindigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MonthAsPaddedNumericString)(
::windows_core::Interface::as_raw(this),
mindigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn AddWeeks(&self, weeks: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddWeeks)(
::windows_core::Interface::as_raw(this),
weeks,
)
.ok()
}
}
pub fn FirstDayInThisMonth(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstDayInThisMonth)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastDayInThisMonth(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastDayInThisMonth)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfDaysInThisMonth(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfDaysInThisMonth)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn Day(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Day)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetDay(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetDay)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddDays(&self, days: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddDays)(
::windows_core::Interface::as_raw(this),
days,
)
.ok()
}
}
pub fn DayAsString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).DayAsString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn DayAsPaddedString(
&self,
mindigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).DayAsPaddedString)(
::windows_core::Interface::as_raw(this),
mindigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn DayOfWeek(&self) -> ::windows_core::Result<DayOfWeek> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).DayOfWeek)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn DayOfWeekAsFullString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).DayOfWeekAsFullString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn DayOfWeekAsString(
&self,
ideallength: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).DayOfWeekAsString)(
::windows_core::Interface::as_raw(this),
ideallength,
&mut result__,
)
.from_abi(result__)
}
}
pub fn DayOfWeekAsFullSoloString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).DayOfWeekAsFullSoloString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn DayOfWeekAsSoloString(
&self,
ideallength: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).DayOfWeekAsSoloString)(
::windows_core::Interface::as_raw(this),
ideallength,
&mut result__,
)
.from_abi(result__)
}
}
pub fn FirstPeriodInThisDay(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstPeriodInThisDay)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastPeriodInThisDay(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastPeriodInThisDay)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfPeriodsInThisDay(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfPeriodsInThisDay)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn Period(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Period)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetPeriod(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetPeriod)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddPeriods(&self, periods: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddPeriods)(
::windows_core::Interface::as_raw(this),
periods,
)
.ok()
}
}
pub fn PeriodAsFullString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).PeriodAsFullString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn PeriodAsString(
&self,
ideallength: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).PeriodAsString)(
::windows_core::Interface::as_raw(this),
ideallength,
&mut result__,
)
.from_abi(result__)
}
}
pub fn FirstHourInThisPeriod(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstHourInThisPeriod)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastHourInThisPeriod(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastHourInThisPeriod)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfHoursInThisPeriod(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfHoursInThisPeriod)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn Hour(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Hour)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetHour(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetHour)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddHours(&self, hours: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddHours)(
::windows_core::Interface::as_raw(this),
hours,
)
.ok()
}
}
pub fn HourAsString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).HourAsString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn HourAsPaddedString(
&self,
mindigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).HourAsPaddedString)(
::windows_core::Interface::as_raw(this),
mindigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn Minute(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Minute)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetMinute(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetMinute)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddMinutes(&self, minutes: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddMinutes)(
::windows_core::Interface::as_raw(this),
minutes,
)
.ok()
}
}
pub fn MinuteAsString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MinuteAsString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn MinuteAsPaddedString(
&self,
mindigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).MinuteAsPaddedString)(
::windows_core::Interface::as_raw(this),
mindigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn Second(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Second)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetSecond(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetSecond)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddSeconds(&self, seconds: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddSeconds)(
::windows_core::Interface::as_raw(this),
seconds,
)
.ok()
}
}
pub fn SecondAsString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).SecondAsString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SecondAsPaddedString(
&self,
mindigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).SecondAsPaddedString)(
::windows_core::Interface::as_raw(this),
mindigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn Nanosecond(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Nanosecond)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn SetNanosecond(&self, value: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).SetNanosecond)(
::windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn AddNanoseconds(&self, nanoseconds: i32) -> ::windows_core::Result<()> {
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).AddNanoseconds)(
::windows_core::Interface::as_raw(this),
nanoseconds,
)
.ok()
}
}
pub fn NanosecondAsString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NanosecondAsString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NanosecondAsPaddedString(
&self,
mindigits: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NanosecondAsPaddedString)(
::windows_core::Interface::as_raw(this),
mindigits,
&mut result__,
)
.from_abi(result__)
}
}
pub fn Compare<P0>(&self, other: P0) -> ::windows_core::Result<i32>
where
P0: ::windows_core::IntoParam<Calendar>,
{
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).Compare)(
::windows_core::Interface::as_raw(this),
other.into_param().abi(),
&mut result__,
)
.from_abi(result__)
}
}
pub fn CompareDateTime(
&self,
other: super::Foundation::DateTime,
) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).CompareDateTime)(
::windows_core::Interface::as_raw(this),
other,
&mut result__,
)
.from_abi(result__)
}
}
pub fn CopyTo<P0>(&self, other: P0) -> ::windows_core::Result<()>
where
P0: ::windows_core::IntoParam<Calendar>,
{
let this = self;
unsafe {
(::windows_core::Interface::vtable(this).CopyTo)(
::windows_core::Interface::as_raw(this),
other.into_param().abi(),
)
.ok()
}
}
pub fn FirstMinuteInThisHour(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstMinuteInThisHour)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastMinuteInThisHour(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastMinuteInThisHour)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfMinutesInThisHour(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfMinutesInThisHour)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn FirstSecondInThisMinute(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).FirstSecondInThisMinute)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn LastSecondInThisMinute(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).LastSecondInThisMinute)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn NumberOfSecondsInThisMinute(&self) -> ::windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).NumberOfSecondsInThisMinute)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn ResolvedLanguage(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).ResolvedLanguage)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn IsDaylightSavingTime(&self) -> ::windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).IsDaylightSavingTime)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn CreateCalendarDefaultCalendarAndClock<P0>(
languages: P0,
) -> ::windows_core::Result<Calendar>
where
P0: ::windows_core::TryIntoParam<
super::Foundation::Collections::IIterable<::windows_core::HSTRING>,
>,
{
Self::ICalendarFactory(|this| unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).CreateCalendarDefaultCalendarAndClock)(
::windows_core::Interface::as_raw(this),
languages.try_into_param()?.abi(),
&mut result__,
)
.from_abi(result__)
})
}
pub fn CreateCalendar<P0>(
languages: P0,
calendar: &::windows_core::HSTRING,
clock: &::windows_core::HSTRING,
) -> ::windows_core::Result<Calendar>
where
P0: ::windows_core::TryIntoParam<
super::Foundation::Collections::IIterable<::windows_core::HSTRING>,
>,
{
Self::ICalendarFactory(|this| unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).CreateCalendar)(
::windows_core::Interface::as_raw(this),
languages.try_into_param()?.abi(),
::core::mem::transmute_copy(calendar),
::core::mem::transmute_copy(clock),
&mut result__,
)
.from_abi(result__)
})
}
pub fn CreateCalendarWithTimeZone<P0>(
languages: P0,
calendar: &::windows_core::HSTRING,
clock: &::windows_core::HSTRING,
timezoneid: &::windows_core::HSTRING,
) -> ::windows_core::Result<Calendar>
where
P0: ::windows_core::TryIntoParam<
super::Foundation::Collections::IIterable<::windows_core::HSTRING>,
>,
{
Self::ICalendarFactory2(|this| unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).CreateCalendarWithTimeZone)(
::windows_core::Interface::as_raw(this),
languages.try_into_param()?.abi(),
::core::mem::transmute_copy(calendar),
::core::mem::transmute_copy(clock),
::core::mem::transmute_copy(timezoneid),
&mut result__,
)
.from_abi(result__)
})
}
pub fn GetTimeZone(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = &::windows_core::ComInterface::cast::<ITimeZoneOnCalendar>(self)?;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).GetTimeZone)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn ChangeTimeZone(
&self,
timezoneid: &::windows_core::HSTRING,
) -> ::windows_core::Result<()> {
let this = &::windows_core::ComInterface::cast::<ITimeZoneOnCalendar>(self)?;
unsafe {
(::windows_core::Interface::vtable(this).ChangeTimeZone)(
::windows_core::Interface::as_raw(this),
::core::mem::transmute_copy(timezoneid),
)
.ok()
}
}
pub fn TimeZoneAsFullString(&self) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = &::windows_core::ComInterface::cast::<ITimeZoneOnCalendar>(self)?;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).TimeZoneAsFullString)(
::windows_core::Interface::as_raw(this),
&mut result__,
)
.from_abi(result__)
}
}
pub fn TimeZoneAsString(
&self,
ideallength: i32,
) -> ::windows_core::Result<::windows_core::HSTRING> {
let this = &::windows_core::ComInterface::cast::<ITimeZoneOnCalendar>(self)?;
unsafe {
let mut result__ = ::std::mem::zeroed();
(::windows_core::Interface::vtable(this).TimeZoneAsString)(
::windows_core::Interface::as_raw(this),
ideallength,
&mut result__,
)
.from_abi(result__)
}
}
#[doc(hidden)]
pub fn ICalendarFactory<R, F: FnOnce(&ICalendarFactory) -> ::windows_core::Result<R>>(
callback: F,
) -> ::windows_core::Result<R> {
static SHARED: ::windows_core::imp::FactoryCache<Calendar, ICalendarFactory> =
::windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
#[doc(hidden)]
pub fn ICalendarFactory2<R, F: FnOnce(&ICalendarFactory2) -> ::windows_core::Result<R>>(
callback: F,
) -> ::windows_core::Result<R> {
static SHARED: ::windows_core::imp::FactoryCache<Calendar, ICalendarFactory2> =
::windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
}
impl ::core::cmp::PartialEq for Calendar {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for Calendar {}
impl ::core::fmt::Debug for Calendar {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("Calendar").field(&self.0).finish()
}
}
impl ::windows_core::RuntimeType for Calendar {
const SIGNATURE: ::windows_core::imp::ConstBuffer =
::windows_core::imp::ConstBuffer::from_slice(
b"rc(Windows.Globalization.Calendar;{ca30221d-86d9-40fb-a26b-d44eb7cf08ea})",
);
}
impl ::core::clone::Clone for Calendar {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
unsafe impl ::windows_core::Interface for Calendar {
type Vtable = ICalendar_Vtbl;
}
unsafe impl ::windows_core::ComInterface for Calendar {
const IID: ::windows_core::GUID = <ICalendar as ::windows_core::ComInterface>::IID;
}
impl ::windows_core::RuntimeName for Calendar {
const NAME: &'static str = "Windows.Globalization.Calendar";
}
::windows_core::imp::interface_hierarchy!(
Calendar,
::windows_core::IUnknown,
::windows_core::IInspectable
);
unsafe impl ::core::marker::Send for Calendar {}
unsafe impl ::core::marker::Sync for Calendar {}
#[repr(transparent)]
#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
pub struct DayOfWeek(pub i32);
impl DayOfWeek {
pub const Sunday: Self = Self(0i32);
pub const Monday: Self = Self(1i32);
pub const Tuesday: Self = Self(2i32);
pub const Wednesday: Self = Self(3i32);
pub const Thursday: Self = Self(4i32);
pub const Friday: Self = Self(5i32);
pub const Saturday: Self = Self(6i32);
}
impl ::core::marker::Copy for DayOfWeek {}
impl ::core::clone::Clone for DayOfWeek {
fn clone(&self) -> Self {
*self
}
}
impl ::core::default::Default for DayOfWeek {
fn default() -> Self {
Self(0)
}
}
impl ::windows_core::TypeKind for DayOfWeek {
type TypeKind = ::windows_core::CopyType;
}
impl ::core::fmt::Debug for DayOfWeek {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("DayOfWeek").field(&self.0).finish()
}
}
impl ::windows_core::RuntimeType for DayOfWeek {
const SIGNATURE: ::windows_core::imp::ConstBuffer =
::windows_core::imp::ConstBuffer::from_slice(
b"enum(Windows.Globalization.DayOfWeek;i4)",
);
}
}