objc2_ui_kit/generated/
UICornerRadius.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// Represents a radius used to round a corner.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uicornerradius?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct UICornerRadius;
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for UICornerRadius {}
22);
23
24unsafe impl CopyingHelper for UICornerRadius {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for UICornerRadius {}
30);
31
32impl UICornerRadius {
33    extern_methods!(
34        #[cfg(feature = "objc2-core-foundation")]
35        /// A fixed corner radius in points.
36        #[unsafe(method(fixedRadius:))]
37        #[unsafe(method_family = none)]
38        pub fn fixedRadius(radius: CGFloat) -> Retained<Self>;
39
40        /// A dynamic corner radius calculated using the geometry of the view and its container.
41        #[unsafe(method(containerConcentricRadius))]
42        #[unsafe(method_family = none)]
43        pub fn containerConcentricRadius() -> Retained<Self>;
44
45        #[cfg(feature = "objc2-core-foundation")]
46        /// A dynamic corner radius calculated using the geometry of the view and its container limited to a minimum radius.
47        #[unsafe(method(containerConcentricRadiusWithMinimum:))]
48        #[unsafe(method_family = none)]
49        pub fn containerConcentricRadiusWithMinimum(minimum: CGFloat) -> Retained<Self>;
50
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55        #[unsafe(method(new))]
56        #[unsafe(method_family = new)]
57        pub unsafe fn new() -> Retained<Self>;
58    );
59}