1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uilistcontentimageproperties?language=objc)
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIListContentImageProperties;
);
extern_conformance!(
unsafe impl NSCoding for UIListContentImageProperties {}
);
extern_conformance!(
unsafe impl NSCopying for UIListContentImageProperties {}
);
unsafe impl CopyingHelper for UIListContentImageProperties {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UIListContentImageProperties {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UIListContentImageProperties {}
);
impl UIListContentImageProperties {
extern_methods!(
#[cfg(all(
feature = "UIImageConfiguration",
feature = "UIImageSymbolConfiguration"
))]
/// The symbol configuration to use.
#[unsafe(method(preferredSymbolConfiguration))]
#[unsafe(method_family = none)]
pub fn preferredSymbolConfiguration(&self) -> Option<Retained<UIImageSymbolConfiguration>>;
#[cfg(all(
feature = "UIImageConfiguration",
feature = "UIImageSymbolConfiguration"
))]
/// Setter for [`preferredSymbolConfiguration`][Self::preferredSymbolConfiguration].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setPreferredSymbolConfiguration:))]
#[unsafe(method_family = none)]
pub fn setPreferredSymbolConfiguration(
&self,
preferred_symbol_configuration: Option<&UIImageSymbolConfiguration>,
);
#[cfg(feature = "UIColor")]
/// The tintColor to apply to the image view. Nil will use the image view's normal inherited tintColor.
#[unsafe(method(tintColor))]
#[unsafe(method_family = none)]
pub fn tintColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
/// Setter for [`tintColor`][Self::tintColor].
#[unsafe(method(setTintColor:))]
#[unsafe(method_family = none)]
pub fn setTintColor(&self, tint_color: Option<&UIColor>);
#[cfg(all(
feature = "UIColor",
feature = "UIConfigurationColorTransformer",
feature = "block2"
))]
/// Optional color transformer that is used to resolve the tint color. A nil value means the `tintColor` is used as-is.
///
/// # Safety
///
/// The returned block's argument must be a valid pointer.
#[unsafe(method(tintColorTransformer))]
#[unsafe(method_family = none)]
pub unsafe fn tintColorTransformer(&self) -> UIConfigurationColorTransformer;
#[cfg(all(
feature = "UIColor",
feature = "UIConfigurationColorTransformer",
feature = "block2"
))]
/// Setter for [`tintColorTransformer`][Self::tintColorTransformer].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
///
/// # Safety
///
/// `tint_color_transformer` must be a valid pointer or null.
#[unsafe(method(setTintColorTransformer:))]
#[unsafe(method_family = none)]
pub unsafe fn setTintColorTransformer(
&self,
tint_color_transformer: UIConfigurationColorTransformer,
);
#[cfg(feature = "UIColor")]
/// Returns the resolved image tint color for the specified tint color of the view, based on the `tintColor` and `tintColorTransformer`.
#[unsafe(method(resolvedTintColorForTintColor:))]
#[unsafe(method_family = none)]
pub fn resolvedTintColorForTintColor(&self, tint_color: &UIColor) -> Retained<UIColor>;
#[cfg(feature = "objc2-core-foundation")]
/// The preferred corner radius (using a continuous corner curve) for the image.
/// Default is 0. If the image is too small to fit the requested radius, the corner curve
/// and radius will be adjusted to fit.
#[unsafe(method(cornerRadius))]
#[unsafe(method_family = none)]
pub fn cornerRadius(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
/// Setter for [`cornerRadius`][Self::cornerRadius].
#[unsafe(method(setCornerRadius:))]
#[unsafe(method_family = none)]
pub fn setCornerRadius(&self, corner_radius: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
/// Enforces a maximum size for the image. The default value is CGSizeZero. A zero width or
/// height means the size is unconstrained on that dimension. If the image exceeds this size
/// on either dimension, its size will be reduced proportionately (maintaining aspect ratio).
#[unsafe(method(maximumSize))]
#[unsafe(method_family = none)]
pub fn maximumSize(&self) -> CGSize;
#[cfg(feature = "objc2-core-foundation")]
/// Setter for [`maximumSize`][Self::maximumSize].
#[unsafe(method(setMaximumSize:))]
#[unsafe(method_family = none)]
pub fn setMaximumSize(&self, maximum_size: CGSize);
#[cfg(feature = "objc2-core-foundation")]
/// The layout size that is reserved for the image, inside which the image will be centered.
/// The default value is CGSizeZero. The reservedLayoutSize width
/// &
/// height only affect the
/// space reserved for the image and its positioning; they do not affect the image's size.
/// A zero width or height means the default behavior is used for that dimension:
/// * Symbol images will be centered inside a standard width/height that is scaled
/// with the content size category.
/// * Non-symbol images will use a reservedLayoutSize equal to the actual size of the
/// displayed image.
/// Use the UIListContentImageStandardDimension constant for the width and/or height to force
/// the standard symbol image value to be used for that dimension, regardless of the image.
/// This property is used to horizontally align images across adjacent content views (even
/// when the actual image widths may vary slightly), and/or to ensure a consistent height is
/// reserved for different images across different content views (so that the content view
/// heights are consistent even when the actual image heights may vary slightly). The
/// reservedLayoutSize.width is ignored by content views at Accessibility Dynamic Type
/// sizes, and the reservedLayoutSize.height is ignored when using the special Accessibility
/// Dynamic Type layout where text wraps around the image.
#[unsafe(method(reservedLayoutSize))]
#[unsafe(method_family = none)]
pub fn reservedLayoutSize(&self) -> CGSize;
#[cfg(feature = "objc2-core-foundation")]
/// Setter for [`reservedLayoutSize`][Self::reservedLayoutSize].
#[unsafe(method(setReservedLayoutSize:))]
#[unsafe(method_family = none)]
pub fn setReservedLayoutSize(&self, reserved_layout_size: CGSize);
/// Prevents the image from inverting its colors when the accessibility setting is enabled.
#[unsafe(method(accessibilityIgnoresInvertColors))]
#[unsafe(method_family = none)]
pub fn accessibilityIgnoresInvertColors(&self) -> bool;
/// Setter for [`accessibilityIgnoresInvertColors`][Self::accessibilityIgnoresInvertColors].
#[unsafe(method(setAccessibilityIgnoresInvertColors:))]
#[unsafe(method_family = none)]
pub fn setAccessibilityIgnoresInvertColors(
&self,
accessibility_ignores_invert_colors: bool,
);
#[cfg(feature = "objc2-core-foundation")]
/// The width of the stroke to draw around the image. Default is `0.0`.
#[unsafe(method(strokeWidth))]
#[unsafe(method_family = none)]
pub fn strokeWidth(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
/// Setter for [`strokeWidth`][Self::strokeWidth].
#[unsafe(method(setStrokeWidth:))]
#[unsafe(method_family = none)]
pub fn setStrokeWidth(&self, stroke_width: CGFloat);
#[cfg(feature = "UIColor")]
/// Configures the color of the stroke. A nil value uses the view's tint color; use `clearColor` for no color (transparent).
#[unsafe(method(strokeColor))]
#[unsafe(method_family = none)]
pub fn strokeColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
/// Setter for [`strokeColor`][Self::strokeColor].
#[unsafe(method(setStrokeColor:))]
#[unsafe(method_family = none)]
pub fn setStrokeColor(&self, stroke_color: Option<&UIColor>);
#[cfg(all(
feature = "UIColor",
feature = "UIConfigurationColorTransformer",
feature = "block2"
))]
/// Optional color transformer that is used to resolve the stroke color. A nil value means the `strokeColor` is used as-is.
///
/// # Safety
///
/// The returned block's argument must be a valid pointer.
#[unsafe(method(strokeColorTransformer))]
#[unsafe(method_family = none)]
pub unsafe fn strokeColorTransformer(&self) -> UIConfigurationColorTransformer;
#[cfg(all(
feature = "UIColor",
feature = "UIConfigurationColorTransformer",
feature = "block2"
))]
/// Setter for [`strokeColorTransformer`][Self::strokeColorTransformer].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
///
/// # Safety
///
/// `stroke_color_transformer` must be a valid pointer or null.
#[unsafe(method(setStrokeColorTransformer:))]
#[unsafe(method_family = none)]
pub unsafe fn setStrokeColorTransformer(
&self,
stroke_color_transformer: UIConfigurationColorTransformer,
);
#[cfg(feature = "UIColor")]
/// Returns the resolved stroke color for the specified tint color, based on the `strokeColor` and `strokeColorTransformer`.
#[unsafe(method(resolvedStrokeColorForTintColor:))]
#[unsafe(method_family = none)]
pub fn resolvedStrokeColorForTintColor(&self, tint_color: &UIColor) -> Retained<UIColor>;
);
}
/// Methods declared on superclass `NSObject`.
impl UIListContentImageProperties {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern "C" {
/// A special constant that can be set to the `reservedLayoutSize` width or height. This
/// forces the system standard value that a symbol image would use for that dimension,
/// even when the image is not a symbol image.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uilistcontentimagestandarddimension?language=objc)
#[cfg(feature = "objc2-core-foundation")]
pub static UIListContentImageStandardDimension: CGFloat;
}