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!(
    /// Defines how corner radii are mapped to the corners of a rectangle.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uicornerconfiguration?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UICornerConfiguration;
);

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

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

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

impl UICornerConfiguration {
    extern_methods!(
        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the given radius independently to all corners.
        ///
        /// When used with a container concentric radius, this allows each individual
        /// corner to resolve to different radii.
        #[unsafe(method(configurationWithRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithRadius(radius: &UICornerRadius) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration with independent radii for each corner.
        #[unsafe(method(configurationWithTopLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithTopLeftRadius_topRightRadius_bottomLeftRadius_bottomRightRadius(
            top_left_radius: Option<&UICornerRadius>,
            top_right_radius: Option<&UICornerRadius>,
            bottom_left_radius: Option<&UICornerRadius>,
            bottom_right_radius: Option<&UICornerRadius>,
        ) -> Retained<Self>;

        /// A configuration that rounds the corners into a capsule shape, scaling with the view's size.
        #[unsafe(method(capsuleConfiguration))]
        #[unsafe(method_family = none)]
        pub fn capsuleConfiguration() -> Retained<Self>;

        #[cfg(feature = "objc2-core-foundation")]
        /// A configuration that rounds the corners into a capsule shape, scaling with the view's size and clamped to the `maximumRadius`.
        #[unsafe(method(capsuleConfigurationWithMaximumRadius:))]
        #[unsafe(method_family = none)]
        pub fn capsuleConfigurationWithMaximumRadius(maximum_radius: CGFloat) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the given radius uniformly to all corners.
        #[unsafe(method(configurationWithUniformRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithUniformRadius(radius: &UICornerRadius) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the `topRadius` uniformly to the top-left and top-right corners, and the `bottomRadius` uniformly to the bottom-left and bottom-right corners.
        #[unsafe(method(configurationWithUniformTopRadius:uniformBottomRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithUniformTopRadius_uniformBottomRadius(
            top_radius: &UICornerRadius,
            bottom_radius: &UICornerRadius,
        ) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the `leftRadius` uniformly to the top-left and bottom-left corners, and the `rightRadius` uniformly to the top-right and bottom-right corners.
        #[unsafe(method(configurationWithUniformLeftRadius:uniformRightRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithUniformLeftRadius_uniformRightRadius(
            left_radius: &UICornerRadius,
            right_radius: &UICornerRadius,
        ) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the `topRadius` uniformly to the top-left and top-right corners, with optional independent radii for the bottom-left and bottom-right corners.
        #[unsafe(method(configurationWithUniformTopRadius:bottomLeftRadius:bottomRightRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithUniformTopRadius_bottomLeftRadius_bottomRightRadius(
            top_radius: &UICornerRadius,
            bottom_left_radius: Option<&UICornerRadius>,
            bottom_right_radius: Option<&UICornerRadius>,
        ) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the `bottomRadius` uniformly to the bottom-left and bottom-right corners, with optional independent radii for the top-left and top-right corners.
        #[unsafe(method(configurationWithUniformBottomRadius:topLeftRadius:topRightRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithUniformBottomRadius_topLeftRadius_topRightRadius(
            bottom_radius: &UICornerRadius,
            top_left_radius: Option<&UICornerRadius>,
            top_right_radius: Option<&UICornerRadius>,
        ) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the `leftRadius` uniformly to the top-left and bottom-left corners, with optional independent radii for the top-right and bottom-right corners.
        #[unsafe(method(configurationWithUniformLeftRadius:topRightRadius:bottomRightRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithUniformLeftRadius_topRightRadius_bottomRightRadius(
            left_radius: &UICornerRadius,
            top_right_radius: Option<&UICornerRadius>,
            bottom_right_radius: Option<&UICornerRadius>,
        ) -> Retained<Self>;

        #[cfg(feature = "UICornerRadius")]
        /// A configuration that applies the `rightRadius` uniformly to the top-right and bottom-right corners, with optional independent radii for the top-left and bottom-left corners.
        #[unsafe(method(configurationWithUniformRightRadius:topLeftRadius:bottomLeftRadius:))]
        #[unsafe(method_family = none)]
        pub fn configurationWithUniformRightRadius_topLeftRadius_bottomLeftRadius(
            right_radius: &UICornerRadius,
            top_left_radius: Option<&UICornerRadius>,
            bottom_left_radius: Option<&UICornerRadius>,
        ) -> 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>;
    );
}