objc2_ui_kit/generated/
NSShadow.rs1use 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 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct NSShadow;
17);
18
19extern_conformance!(
20 unsafe impl NSCoding for NSShadow {}
21);
22
23extern_conformance!(
24 unsafe impl NSCopying for NSShadow {}
25);
26
27unsafe impl CopyingHelper for NSShadow {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSObjectProtocol for NSShadow {}
33);
34
35extern_conformance!(
36 unsafe impl NSSecureCoding for NSShadow {}
37);
38
39impl NSShadow {
40 extern_methods!(
41 #[unsafe(method(init))]
42 #[unsafe(method_family = init)]
43 pub fn init(this: Allocated<Self>) -> Retained<Self>;
44
45 #[unsafe(method(initWithCoder:))]
49 #[unsafe(method_family = init)]
50 pub unsafe fn initWithCoder(
51 this: Allocated<Self>,
52 coder: &NSCoder,
53 ) -> Option<Retained<Self>>;
54
55 #[cfg(feature = "objc2-core-foundation")]
56 #[unsafe(method(shadowOffset))]
57 #[unsafe(method_family = none)]
58 pub fn shadowOffset(&self) -> CGSize;
59
60 #[cfg(feature = "objc2-core-foundation")]
61 #[unsafe(method(setShadowOffset:))]
63 #[unsafe(method_family = none)]
64 pub fn setShadowOffset(&self, shadow_offset: CGSize);
65
66 #[cfg(feature = "objc2-core-foundation")]
67 #[unsafe(method(shadowBlurRadius))]
68 #[unsafe(method_family = none)]
69 pub fn shadowBlurRadius(&self) -> CGFloat;
70
71 #[cfg(feature = "objc2-core-foundation")]
72 #[unsafe(method(setShadowBlurRadius:))]
74 #[unsafe(method_family = none)]
75 pub fn setShadowBlurRadius(&self, shadow_blur_radius: CGFloat);
76
77 #[unsafe(method(shadowColor))]
78 #[unsafe(method_family = none)]
79 pub fn shadowColor(&self) -> Option<Retained<AnyObject>>;
80
81 #[unsafe(method(setShadowColor:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setShadowColor(&self, shadow_color: Option<&AnyObject>);
89 );
90}
91
92impl NSShadow {
94 extern_methods!(
95 #[unsafe(method(new))]
96 #[unsafe(method_family = new)]
97 pub fn new() -> Retained<Self>;
98 );
99}
100
101impl DefaultRetained for NSShadow {
102 #[inline]
103 fn default_retained() -> Retained<Self> {
104 Self::new()
105 }
106}