objc2_app_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(shadowOffset))]
46 #[unsafe(method_family = none)]
47 pub fn shadowOffset(&self) -> NSSize;
48
49 #[unsafe(method(setShadowOffset:))]
51 #[unsafe(method_family = none)]
52 pub fn setShadowOffset(&self, shadow_offset: NSSize);
53
54 #[cfg(feature = "objc2-core-foundation")]
55 #[unsafe(method(shadowBlurRadius))]
56 #[unsafe(method_family = none)]
57 pub fn shadowBlurRadius(&self) -> CGFloat;
58
59 #[cfg(feature = "objc2-core-foundation")]
60 #[unsafe(method(setShadowBlurRadius:))]
62 #[unsafe(method_family = none)]
63 pub fn setShadowBlurRadius(&self, shadow_blur_radius: CGFloat);
64
65 #[cfg(feature = "NSColor")]
66 #[unsafe(method(shadowColor))]
67 #[unsafe(method_family = none)]
68 pub fn shadowColor(&self) -> Option<Retained<NSColor>>;
69
70 #[cfg(feature = "NSColor")]
71 #[unsafe(method(setShadowColor:))]
75 #[unsafe(method_family = none)]
76 pub fn setShadowColor(&self, shadow_color: Option<&NSColor>);
77
78 #[unsafe(method(set))]
79 #[unsafe(method_family = none)]
80 pub fn set(&self);
81 );
82}
83
84impl NSShadow {
86 extern_methods!(
87 #[unsafe(method(new))]
88 #[unsafe(method_family = new)]
89 pub fn new() -> Retained<Self>;
90 );
91}
92
93impl DefaultRetained for NSShadow {
94 #[inline]
95 fn default_retained() -> Retained<Self> {
96 Self::new()
97 }
98}