objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicubictimingparameters?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UICubicTimingParameters;
);

extern_conformance!(
    unsafe impl NSCoding for UICubicTimingParameters {}
);

extern_conformance!(
    unsafe impl NSCopying for UICubicTimingParameters {}
);

unsafe impl CopyingHelper for UICubicTimingParameters {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UICubicTimingParameters {}
);

#[cfg(feature = "UITimingCurveProvider")]
extern_conformance!(
    unsafe impl UITimingCurveProvider for UICubicTimingParameters {}
);

impl UICubicTimingParameters {
    extern_methods!(
        #[cfg(feature = "UIView")]
        #[unsafe(method(animationCurve))]
        #[unsafe(method_family = none)]
        pub fn animationCurve(&self) -> UIViewAnimationCurve;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(controlPoint1))]
        #[unsafe(method_family = none)]
        pub fn controlPoint1(&self) -> CGPoint;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(controlPoint2))]
        #[unsafe(method_family = none)]
        pub fn controlPoint2(&self) -> CGPoint;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "UIView")]
        #[unsafe(method(initWithAnimationCurve:))]
        #[unsafe(method_family = init)]
        pub fn initWithAnimationCurve(
            this: Allocated<Self>,
            curve: UIViewAnimationCurve,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initWithControlPoint1:controlPoint2:))]
        #[unsafe(method_family = init)]
        pub fn initWithControlPoint1_controlPoint2(
            this: Allocated<Self>,
            point1: CGPoint,
            point2: CGPoint,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UICubicTimingParameters {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uispringtimingparameters?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UISpringTimingParameters;
);

extern_conformance!(
    unsafe impl NSCoding for UISpringTimingParameters {}
);

extern_conformance!(
    unsafe impl NSCopying for UISpringTimingParameters {}
);

unsafe impl CopyingHelper for UISpringTimingParameters {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UISpringTimingParameters {}
);

#[cfg(feature = "UITimingCurveProvider")]
extern_conformance!(
    unsafe impl UITimingCurveProvider for UISpringTimingParameters {}
);

impl UISpringTimingParameters {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initialVelocity))]
        #[unsafe(method_family = none)]
        pub fn initialVelocity(&self) -> CGVector;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initWithDampingRatio:initialVelocity:))]
        #[unsafe(method_family = init)]
        pub fn initWithDampingRatio_initialVelocity(
            this: Allocated<Self>,
            ratio: CGFloat,
            velocity: CGVector,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initWithMass:stiffness:damping:initialVelocity:))]
        #[unsafe(method_family = init)]
        pub fn initWithMass_stiffness_damping_initialVelocity(
            this: Allocated<Self>,
            mass: CGFloat,
            stiffness: CGFloat,
            damping: CGFloat,
            velocity: CGVector,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initWithDampingRatio:))]
        #[unsafe(method_family = init)]
        pub fn initWithDampingRatio(this: Allocated<Self>, ratio: CGFloat) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initWithDuration:bounce:initialVelocity:))]
        #[unsafe(method_family = init)]
        pub fn initWithDuration_bounce_initialVelocity(
            this: Allocated<Self>,
            duration: NSTimeInterval,
            bounce: CGFloat,
            velocity: CGVector,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(initWithDuration:bounce:))]
        #[unsafe(method_family = init)]
        pub fn initWithDuration_bounce(
            this: Allocated<Self>,
            duration: NSTimeInterval,
            bounce: CGFloat,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl UISpringTimingParameters {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}