objc2_ui_kit/generated/
UIContentUnavailableImageProperties.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/uicontentunavailableimageproperties?language=objc)
14    #[unsafe(super(NSObject))]
15    #[thread_kind = MainThreadOnly]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct UIContentUnavailableImageProperties;
18);
19
20extern_conformance!(
21    unsafe impl NSCoding for UIContentUnavailableImageProperties {}
22);
23
24extern_conformance!(
25    unsafe impl NSCopying for UIContentUnavailableImageProperties {}
26);
27
28unsafe impl CopyingHelper for UIContentUnavailableImageProperties {
29    type Result = Self;
30}
31
32extern_conformance!(
33    unsafe impl NSObjectProtocol for UIContentUnavailableImageProperties {}
34);
35
36extern_conformance!(
37    unsafe impl NSSecureCoding for UIContentUnavailableImageProperties {}
38);
39
40impl UIContentUnavailableImageProperties {
41    extern_methods!(
42        #[cfg(all(
43            feature = "UIImageConfiguration",
44            feature = "UIImageSymbolConfiguration"
45        ))]
46        /// The symbol configuration to use.
47        #[unsafe(method(preferredSymbolConfiguration))]
48        #[unsafe(method_family = none)]
49        pub fn preferredSymbolConfiguration(&self) -> Option<Retained<UIImageSymbolConfiguration>>;
50
51        #[cfg(all(
52            feature = "UIImageConfiguration",
53            feature = "UIImageSymbolConfiguration"
54        ))]
55        /// Setter for [`preferredSymbolConfiguration`][Self::preferredSymbolConfiguration].
56        ///
57        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
58        #[unsafe(method(setPreferredSymbolConfiguration:))]
59        #[unsafe(method_family = none)]
60        pub fn setPreferredSymbolConfiguration(
61            &self,
62            preferred_symbol_configuration: Option<&UIImageSymbolConfiguration>,
63        );
64
65        #[cfg(feature = "UIColor")]
66        /// The tint color to apply to the image view. Nil will use the image view's normal inherited tint color.
67        #[unsafe(method(tintColor))]
68        #[unsafe(method_family = none)]
69        pub fn tintColor(&self) -> Option<Retained<UIColor>>;
70
71        #[cfg(feature = "UIColor")]
72        /// Setter for [`tintColor`][Self::tintColor].
73        #[unsafe(method(setTintColor:))]
74        #[unsafe(method_family = none)]
75        pub fn setTintColor(&self, tint_color: Option<&UIColor>);
76
77        #[cfg(feature = "objc2-core-foundation")]
78        /// The preferred corner radius (using a continuous corner curve) for the image.
79        /// Default is 0. If the image is too small to fit the requested radius, the corner curve
80        /// and radius will be adjusted to fit.
81        #[unsafe(method(cornerRadius))]
82        #[unsafe(method_family = none)]
83        pub fn cornerRadius(&self) -> CGFloat;
84
85        #[cfg(feature = "objc2-core-foundation")]
86        /// Setter for [`cornerRadius`][Self::cornerRadius].
87        #[unsafe(method(setCornerRadius:))]
88        #[unsafe(method_family = none)]
89        pub fn setCornerRadius(&self, corner_radius: CGFloat);
90
91        #[cfg(feature = "objc2-core-foundation")]
92        /// Enforces a maximum size for the image. The default value is CGSizeZero. A zero width or
93        /// height means the size is unconstrained on that dimension. If the image exceeds this size
94        /// on either dimension, its size will be reduced proportionately (maintaining aspect ratio).
95        #[unsafe(method(maximumSize))]
96        #[unsafe(method_family = none)]
97        pub fn maximumSize(&self) -> CGSize;
98
99        #[cfg(feature = "objc2-core-foundation")]
100        /// Setter for [`maximumSize`][Self::maximumSize].
101        #[unsafe(method(setMaximumSize:))]
102        #[unsafe(method_family = none)]
103        pub fn setMaximumSize(&self, maximum_size: CGSize);
104
105        /// Prevents the image from inverting its colors when the accessibility setting is enabled.
106        #[unsafe(method(accessibilityIgnoresInvertColors))]
107        #[unsafe(method_family = none)]
108        pub fn accessibilityIgnoresInvertColors(&self) -> bool;
109
110        /// Setter for [`accessibilityIgnoresInvertColors`][Self::accessibilityIgnoresInvertColors].
111        #[unsafe(method(setAccessibilityIgnoresInvertColors:))]
112        #[unsafe(method_family = none)]
113        pub fn setAccessibilityIgnoresInvertColors(
114            &self,
115            accessibility_ignores_invert_colors: bool,
116        );
117    );
118}
119
120/// Methods declared on superclass `NSObject`.
121impl UIContentUnavailableImageProperties {
122    extern_methods!(
123        #[unsafe(method(init))]
124        #[unsafe(method_family = init)]
125        pub fn init(this: Allocated<Self>) -> Retained<Self>;
126
127        #[unsafe(method(new))]
128        #[unsafe(method_family = new)]
129        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
130    );
131}