diff --git a/cidre/src/cf/data.rs b/cidre/src/cf/data.rs index 7d55da9f..21493f04 100644 --- a/cidre/src/cf/data.rs +++ b/cidre/src/cf/data.rs @@ -6,16 +6,17 @@ use crate::{arc, cf, define_cf_type}; use crate::ns; define_cf_type!( - #[doc(alias = "CFData")] + #[doc(alias = "CFDataRef")] Data(cf::Type) ); define_cf_type!( - #[doc(alias = "CFMutableData")] + #[doc(alias = "CFMutableDataRef")] DataMut(Data) ); impl Data { + #[doc(alias = "CFDataGetTypeID")] #[inline] pub fn type_id() -> cf::TypeId { unsafe { CFDataGetTypeID() } diff --git a/cidre/src/cf/date.rs b/cidre/src/cf/date.rs index ecf9689c..3b5cec5d 100644 --- a/cidre/src/cf/date.rs +++ b/cidre/src/cf/date.rs @@ -4,7 +4,10 @@ use std::ffi::c_void; pub type TimeInterval = std::ffi::c_double; pub type AbsTime = TimeInterval; +#[doc(alias = "kCFAbsoluteTimeIntervalSince1970")] pub const ABS_TIME_INTERVAL_SINCE_1970: TimeInterval = 978307200.0; + +#[doc(alias = "kCFAbsoluteTimeIntervalSince1904")] pub const ABS_TIME_INTERVAL_SINCE_1904: TimeInterval = 3061152000.0; #[cfg(feature = "ns")] diff --git a/cidre/src/cf/notification_center.rs b/cidre/src/cf/notification_center.rs index 699cb1f7..ee824a9d 100644 --- a/cidre/src/cf/notification_center.rs +++ b/cidre/src/cf/notification_center.rs @@ -5,7 +5,10 @@ use crate::{cf, define_cf_type}; #[cfg(feature = "ns")] use crate::ns; -define_cf_type!(NotificationName(cf::String)); +define_cf_type!( + #[doc(alias = "CFNotificationName")] + NotificationName(cf::String) +); impl NotificationName { pub fn with_raw(string: &cf::String) -> &Self { @@ -27,9 +30,13 @@ pub type NotificationCallback = extern "C" fn( user_info: Option<&cf::Dictionary>, ); -define_cf_type!(NotificationCenter(cf::Type)); +define_cf_type!( + #[doc(alias = "CFNotificationCenterRef")] + NotificationCenter(cf::Type) +); impl NotificationCenter { + #[doc(alias = "CFNotificationCenterGetTypeID")] #[inline] pub fn type_id() -> cf::TypeId { unsafe { CFNotificationCenterGetTypeID() } @@ -101,11 +108,17 @@ impl NotificationCenter { } } +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[doc(alias = "CFNotificationSuspensionBehavior")] #[repr(isize)] pub enum NotificationSuspensionBehavior { + #[doc(alias = "kCFNotificationSuspensionBehaviorDrop")] Drop = 1, + #[doc(alias = "kCFNotificationSuspensionBehaviorCoalesce")] Coalesce = 2, + #[doc(alias = "kCFNotificationSuspensionBehaviorHold")] Hold = 3, + #[doc(alias = "kCFNotificationSuspensionBehaviorDeliverImmediately")] DeliverImmediately = 4, } diff --git a/cidre/src/cf/number.rs b/cidre/src/cf/number.rs index 1e0d5258..843f4806 100644 --- a/cidre/src/cf/number.rs +++ b/cidre/src/cf/number.rs @@ -7,7 +7,10 @@ use crate::cf::{Allocator, ComparisonResult, Index, Type, TypeId}; use std::{ffi::c_void, time::Duration}; -define_cf_type!(Boolean(Type)); +define_cf_type!( + #[doc(alias = "CFBooleanRef")] + Boolean(Type) +); impl Boolean { /// ```