//! 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!(
    /// Represents a radius used to round a corner.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uicornerradius?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UICornerRadius;
);

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

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

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

impl UICornerRadius {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        /// A fixed corner radius in points.
        #[unsafe(method(fixedRadius:))]
        #[unsafe(method_family = none)]
        pub fn fixedRadius(radius: CGFloat) -> Retained<Self>;

        /// A dynamic corner radius calculated using the geometry of the view and its container.
        #[unsafe(method(containerConcentricRadius))]
        #[unsafe(method_family = none)]
        pub fn containerConcentricRadius() -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        /// A dynamic corner radius calculated using the geometry of the view and its container limited to a minimum radius.
        #[unsafe(method(containerConcentricRadiusWithMinimum:))]
        #[unsafe(method_family = none)]
        pub fn containerConcentricRadiusWithMinimum(minimum: CGFloat) -> Retained<Self>;

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

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
