objc2_app_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/appkit/nsshadow?language=objc)
14    #[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 unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45        #[unsafe(method(shadowOffset))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn shadowOffset(&self) -> NSSize;
48
49        /// Setter for [`shadowOffset`][Self::shadowOffset].
50        #[unsafe(method(setShadowOffset:))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn setShadowOffset(&self, shadow_offset: NSSize);
53
54        #[cfg(feature = "objc2-core-foundation")]
55        #[unsafe(method(shadowBlurRadius))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn shadowBlurRadius(&self) -> CGFloat;
58
59        #[cfg(feature = "objc2-core-foundation")]
60        /// Setter for [`shadowBlurRadius`][Self::shadowBlurRadius].
61        #[unsafe(method(setShadowBlurRadius:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn setShadowBlurRadius(&self, shadow_blur_radius: CGFloat);
64
65        #[cfg(feature = "NSColor")]
66        #[unsafe(method(shadowColor))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn shadowColor(&self) -> Option<Retained<NSColor>>;
69
70        #[cfg(feature = "NSColor")]
71        /// Setter for [`shadowColor`][Self::shadowColor].
72        #[unsafe(method(setShadowColor:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn setShadowColor(&self, shadow_color: Option<&NSColor>);
75
76        #[unsafe(method(set))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn set(&self);
79    );
80}
81
82/// Methods declared on superclass `NSObject`.
83impl NSShadow {
84    extern_methods!(
85        #[unsafe(method(new))]
86        #[unsafe(method_family = new)]
87        pub unsafe fn new() -> Retained<Self>;
88    );
89}