use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(target_vendor = "apple")]
use objc2_quartz_core::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSAnimationContext;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSAnimationContext {}
);
impl NSAnimationContext {
extern_methods!(
#[cfg(feature = "block2")]
#[unsafe(method(runAnimationGroup:completionHandler:))]
#[unsafe(method_family = none)]
pub fn runAnimationGroup_completionHandler(
changes: &block2::DynBlock<dyn Fn(NonNull<NSAnimationContext>) + '_>,
completion_handler: Option<&block2::DynBlock<dyn Fn()>>,
);
#[cfg(feature = "block2")]
#[unsafe(method(runAnimationGroup:))]
#[unsafe(method_family = none)]
pub fn runAnimationGroup(
changes: &block2::DynBlock<dyn Fn(NonNull<NSAnimationContext>) + '_>,
);
#[unsafe(method(beginGrouping))]
#[unsafe(method_family = none)]
pub fn beginGrouping();
#[unsafe(method(endGrouping))]
#[unsafe(method_family = none)]
pub fn endGrouping();
#[unsafe(method(currentContext))]
#[unsafe(method_family = none)]
pub fn currentContext() -> Retained<NSAnimationContext>;
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub fn duration(&self) -> NSTimeInterval;
#[unsafe(method(setDuration:))]
#[unsafe(method_family = none)]
pub fn setDuration(&self, duration: NSTimeInterval);
#[cfg(feature = "objc2-quartz-core")]
#[cfg(target_vendor = "apple")]
#[unsafe(method(timingFunction))]
#[unsafe(method_family = none)]
pub fn timingFunction(&self) -> Option<Retained<CAMediaTimingFunction>>;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(target_vendor = "apple")]
#[unsafe(method(setTimingFunction:))]
#[unsafe(method_family = none)]
pub fn setTimingFunction(&self, timing_function: Option<&CAMediaTimingFunction>);
#[cfg(feature = "block2")]
#[unsafe(method(completionHandler))]
#[unsafe(method_family = none)]
pub fn completionHandler(&self) -> *mut block2::DynBlock<dyn Fn()>;
#[cfg(feature = "block2")]
#[unsafe(method(setCompletionHandler:))]
#[unsafe(method_family = none)]
pub fn setCompletionHandler(&self, completion_handler: Option<&block2::DynBlock<dyn Fn()>>);
#[unsafe(method(allowsImplicitAnimation))]
#[unsafe(method_family = none)]
pub fn allowsImplicitAnimation(&self) -> bool;
#[unsafe(method(setAllowsImplicitAnimation:))]
#[unsafe(method_family = none)]
pub fn setAllowsImplicitAnimation(&self, allows_implicit_animation: bool);
);
}
impl NSAnimationContext {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for NSAnimationContext {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}