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