objc2_ui_kit/generated/
NSShadow.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/nsshadow?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct NSShadow;
17);
18
19unsafe impl NSCoding for NSShadow {}
20
21unsafe impl NSCopying for NSShadow {}
22
23unsafe impl CopyingHelper for NSShadow {
24    type Result = Self;
25}
26
27unsafe impl NSObjectProtocol for NSShadow {}
28
29unsafe impl NSSecureCoding for NSShadow {}
30
31impl NSShadow {
32    extern_methods!(
33        #[unsafe(method(init))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37        #[unsafe(method(initWithCoder:))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn initWithCoder(
40            this: Allocated<Self>,
41            coder: &NSCoder,
42        ) -> Option<Retained<Self>>;
43
44        #[cfg(feature = "objc2-core-foundation")]
45        #[unsafe(method(shadowOffset))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn shadowOffset(&self) -> CGSize;
48
49        #[cfg(feature = "objc2-core-foundation")]
50        /// Setter for [`shadowOffset`][Self::shadowOffset].
51        #[unsafe(method(setShadowOffset:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setShadowOffset(&self, shadow_offset: CGSize);
54
55        #[cfg(feature = "objc2-core-foundation")]
56        #[unsafe(method(shadowBlurRadius))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn shadowBlurRadius(&self) -> CGFloat;
59
60        #[cfg(feature = "objc2-core-foundation")]
61        /// Setter for [`shadowBlurRadius`][Self::shadowBlurRadius].
62        #[unsafe(method(setShadowBlurRadius:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn setShadowBlurRadius(&self, shadow_blur_radius: CGFloat);
65
66        #[unsafe(method(shadowColor))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn shadowColor(&self) -> Option<Retained<AnyObject>>;
69
70        /// Setter for [`shadowColor`][Self::shadowColor].
71        #[unsafe(method(setShadowColor:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn setShadowColor(&self, shadow_color: Option<&AnyObject>);
74    );
75}
76
77/// Methods declared on superclass `NSObject`.
78impl NSShadow {
79    extern_methods!(
80        #[unsafe(method(new))]
81        #[unsafe(method_family = new)]
82        pub unsafe fn new() -> Retained<Self>;
83    );
84}