//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitimingcurvetype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITimingCurveType(pub NSInteger);
impl UITimingCurveType {
    #[doc(alias = "UITimingCurveTypeBuiltin")]
    pub const Builtin: Self = Self(0);
    #[doc(alias = "UITimingCurveTypeCubic")]
    pub const Cubic: Self = Self(1);
    #[doc(alias = "UITimingCurveTypeSpring")]
    pub const Spring: Self = Self(2);
    #[doc(alias = "UITimingCurveTypeComposed")]
    pub const Composed: Self = Self(3);
}

unsafe impl Encode for UITimingCurveType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UITimingCurveType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitimingcurveprovider?language=objc)
    pub unsafe trait UITimingCurveProvider: NSCoding + NSCopying + MainThreadOnly {
        #[unsafe(method(timingCurveType))]
        #[unsafe(method_family = none)]
        fn timingCurveType(&self) -> UITimingCurveType;

        #[cfg(feature = "UITimingParameters")]
        #[unsafe(method(cubicTimingParameters))]
        #[unsafe(method_family = none)]
        fn cubicTimingParameters(&self) -> Option<Retained<UICubicTimingParameters>>;

        #[cfg(feature = "UITimingParameters")]
        #[unsafe(method(springTimingParameters))]
        #[unsafe(method_family = none)]
        fn springTimingParameters(&self) -> Option<Retained<UISpringTimingParameters>>;
    }
);
