use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(HMTimeEvent, HMEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
pub struct HMDurationEvent;
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl Send for HMDurationEvent {}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl Sync for HMDurationEvent {}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
extern_conformance!(
unsafe impl NSCopying for HMDurationEvent {}
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl CopyingHelper for HMDurationEvent {
type Result = Self;
}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
extern_conformance!(
unsafe impl NSMutableCopying for HMDurationEvent {}
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl MutableCopyingHelper for HMDurationEvent {
type Result = HMMutableDurationEvent;
}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
extern_conformance!(
unsafe impl NSObjectProtocol for HMDurationEvent {}
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
impl HMDurationEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithDuration:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDuration(
this: Allocated<Self>,
duration: NSTimeInterval,
) -> Retained<Self>;
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
);
}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
impl HMDurationEvent {
extern_methods!(
#[deprecated = "HMEvent is abstract"]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(HMDurationEvent, HMTimeEvent, HMEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
pub struct HMMutableDurationEvent;
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl Send for HMMutableDurationEvent {}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl Sync for HMMutableDurationEvent {}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
extern_conformance!(
unsafe impl NSCopying for HMMutableDurationEvent {}
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl CopyingHelper for HMMutableDurationEvent {
type Result = HMDurationEvent;
}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
extern_conformance!(
unsafe impl NSMutableCopying for HMMutableDurationEvent {}
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
unsafe impl MutableCopyingHelper for HMMutableDurationEvent {
type Result = Self;
}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
extern_conformance!(
unsafe impl NSObjectProtocol for HMMutableDurationEvent {}
);
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
impl HMMutableDurationEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(setDuration:))]
#[unsafe(method_family = none)]
pub unsafe fn setDuration(&self, duration: NSTimeInterval);
);
}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
impl HMMutableDurationEvent {
extern_methods!(
#[unsafe(method(initWithDuration:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDuration(
this: Allocated<Self>,
duration: NSTimeInterval,
) -> Retained<Self>;
);
}
#[cfg(all(feature = "HMEvent", feature = "HMTimeEvent"))]
impl HMMutableDurationEvent {
extern_methods!(
#[deprecated = "HMEvent is abstract"]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}