objc2_ui_kit/generated/
UIImageSymbolConfiguration.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11#[repr(transparent)]
14#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
15pub struct UIImageSymbolScale(pub NSInteger);
16impl UIImageSymbolScale {
17 #[doc(alias = "UIImageSymbolScaleDefault")]
18 pub const Default: Self = Self(-1);
19 #[doc(alias = "UIImageSymbolScaleUnspecified")]
20 pub const Unspecified: Self = Self(0);
21 #[doc(alias = "UIImageSymbolScaleSmall")]
22 pub const Small: Self = Self(1);
23 #[doc(alias = "UIImageSymbolScaleMedium")]
24 pub const Medium: Self = Self(2);
25 #[doc(alias = "UIImageSymbolScaleLarge")]
26 pub const Large: Self = Self(3);
27}
28
29unsafe impl Encode for UIImageSymbolScale {
30 const ENCODING: Encoding = NSInteger::ENCODING;
31}
32
33unsafe impl RefEncode for UIImageSymbolScale {
34 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37#[repr(transparent)]
40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
41pub struct UIImageSymbolWeight(pub NSInteger);
42impl UIImageSymbolWeight {
43 #[doc(alias = "UIImageSymbolWeightUnspecified")]
44 pub const Unspecified: Self = Self(0);
45 #[doc(alias = "UIImageSymbolWeightUltraLight")]
46 pub const UltraLight: Self = Self(1);
47 #[doc(alias = "UIImageSymbolWeightThin")]
48 pub const Thin: Self = Self(2);
49 #[doc(alias = "UIImageSymbolWeightLight")]
50 pub const Light: Self = Self(3);
51 #[doc(alias = "UIImageSymbolWeightRegular")]
52 pub const Regular: Self = Self(4);
53 #[doc(alias = "UIImageSymbolWeightMedium")]
54 pub const Medium: Self = Self(5);
55 #[doc(alias = "UIImageSymbolWeightSemibold")]
56 pub const Semibold: Self = Self(6);
57 #[doc(alias = "UIImageSymbolWeightBold")]
58 pub const Bold: Self = Self(7);
59 #[doc(alias = "UIImageSymbolWeightHeavy")]
60 pub const Heavy: Self = Self(8);
61 #[doc(alias = "UIImageSymbolWeightBlack")]
62 pub const Black: Self = Self(9);
63}
64
65unsafe impl Encode for UIImageSymbolWeight {
66 const ENCODING: Encoding = NSInteger::ENCODING;
67}
68
69unsafe impl RefEncode for UIImageSymbolWeight {
70 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
71}
72
73extern "C-unwind" {
74 #[cfg(all(feature = "UIFontDescriptor", feature = "objc2-core-foundation"))]
75 pub fn UIFontWeightForImageSymbolWeight(symbol_weight: UIImageSymbolWeight) -> UIFontWeight;
76}
77
78extern "C-unwind" {
79 #[cfg(all(feature = "UIFontDescriptor", feature = "objc2-core-foundation"))]
80 pub fn UIImageSymbolWeightForFontWeight(font_weight: UIFontWeight) -> UIImageSymbolWeight;
81}
82
83extern_class!(
84 #[unsafe(super(UIImageConfiguration, NSObject))]
86 #[derive(Debug, PartialEq, Eq, Hash)]
87 #[cfg(feature = "UIImageConfiguration")]
88 pub struct UIImageSymbolConfiguration;
89);
90
91#[cfg(feature = "UIImageConfiguration")]
92unsafe impl Send for UIImageSymbolConfiguration {}
93
94#[cfg(feature = "UIImageConfiguration")]
95unsafe impl Sync for UIImageSymbolConfiguration {}
96
97#[cfg(feature = "UIImageConfiguration")]
98unsafe impl NSCoding for UIImageSymbolConfiguration {}
99
100#[cfg(feature = "UIImageConfiguration")]
101unsafe impl NSCopying for UIImageSymbolConfiguration {}
102
103#[cfg(feature = "UIImageConfiguration")]
104unsafe impl CopyingHelper for UIImageSymbolConfiguration {
105 type Result = Self;
106}
107
108#[cfg(feature = "UIImageConfiguration")]
109unsafe impl NSObjectProtocol for UIImageSymbolConfiguration {}
110
111#[cfg(feature = "UIImageConfiguration")]
112unsafe impl NSSecureCoding for UIImageSymbolConfiguration {}
113
114#[cfg(feature = "UIImageConfiguration")]
115impl UIImageSymbolConfiguration {
116 extern_methods!(
117 #[unsafe(method(unspecifiedConfiguration))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn unspecifiedConfiguration() -> Retained<UIImageSymbolConfiguration>;
120
121 #[unsafe(method(configurationWithScale:))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn configurationWithScale(scale: UIImageSymbolScale) -> Retained<Self>;
124
125 #[cfg(feature = "objc2-core-foundation")]
126 #[unsafe(method(configurationWithPointSize:))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn configurationWithPointSize(point_size: CGFloat) -> Retained<Self>;
129
130 #[unsafe(method(configurationWithWeight:))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn configurationWithWeight(weight: UIImageSymbolWeight) -> Retained<Self>;
133
134 #[cfg(feature = "objc2-core-foundation")]
135 #[unsafe(method(configurationWithPointSize:weight:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn configurationWithPointSize_weight(
138 point_size: CGFloat,
139 weight: UIImageSymbolWeight,
140 ) -> Retained<Self>;
141
142 #[cfg(feature = "objc2-core-foundation")]
143 #[unsafe(method(configurationWithPointSize:weight:scale:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn configurationWithPointSize_weight_scale(
146 point_size: CGFloat,
147 weight: UIImageSymbolWeight,
148 scale: UIImageSymbolScale,
149 ) -> Retained<Self>;
150
151 #[cfg(feature = "UIFontDescriptor")]
152 #[unsafe(method(configurationWithTextStyle:))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn configurationWithTextStyle(text_style: &UIFontTextStyle) -> Retained<Self>;
155
156 #[cfg(feature = "UIFontDescriptor")]
157 #[unsafe(method(configurationWithTextStyle:scale:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn configurationWithTextStyle_scale(
160 text_style: &UIFontTextStyle,
161 scale: UIImageSymbolScale,
162 ) -> Retained<Self>;
163
164 #[cfg(feature = "UIFont")]
165 #[unsafe(method(configurationWithFont:))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn configurationWithFont(font: &UIFont) -> Retained<Self>;
168
169 #[cfg(feature = "UIFont")]
170 #[unsafe(method(configurationWithFont:scale:))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn configurationWithFont_scale(
173 font: &UIFont,
174 scale: UIImageSymbolScale,
175 ) -> Retained<Self>;
176
177 #[cfg(feature = "UIColor")]
178 #[unsafe(method(configurationWithHierarchicalColor:))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn configurationWithHierarchicalColor(
181 hierarchical_color: &UIColor,
182 ) -> Retained<Self>;
183
184 #[cfg(feature = "UIColor")]
185 #[unsafe(method(configurationWithPaletteColors:))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn configurationWithPaletteColors(
188 palette_colors: &NSArray<UIColor>,
189 ) -> Retained<Self>;
190
191 #[unsafe(method(configurationPreferringMulticolor))]
192 #[unsafe(method_family = none)]
193 pub unsafe fn configurationPreferringMulticolor() -> Retained<Self>;
194
195 #[unsafe(method(configurationPreferringMonochrome))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn configurationPreferringMonochrome() -> Retained<Self>;
198
199 #[unsafe(method(configurationWithoutTextStyle))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn configurationWithoutTextStyle(&self) -> Retained<Self>;
202
203 #[unsafe(method(configurationWithoutScale))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn configurationWithoutScale(&self) -> Retained<Self>;
206
207 #[unsafe(method(configurationWithoutWeight))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn configurationWithoutWeight(&self) -> Retained<Self>;
210
211 #[unsafe(method(configurationWithoutPointSizeAndWeight))]
212 #[unsafe(method_family = none)]
213 pub unsafe fn configurationWithoutPointSizeAndWeight(&self) -> Retained<Self>;
214
215 #[unsafe(method(isEqualToConfiguration:))]
216 #[unsafe(method_family = none)]
217 pub unsafe fn isEqualToConfiguration(
218 &self,
219 other_configuration: Option<&UIImageSymbolConfiguration>,
220 ) -> bool;
221 );
222}
223
224#[cfg(feature = "UIImageConfiguration")]
226impl UIImageSymbolConfiguration {
227 extern_methods!(
228 #[unsafe(method(new))]
229 #[unsafe(method_family = new)]
230 pub unsafe fn new() -> Retained<Self>;
231
232 #[unsafe(method(init))]
233 #[unsafe(method_family = init)]
234 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
235
236 #[cfg(feature = "UITraitCollection")]
237 #[unsafe(method(configurationWithTraitCollection:))]
238 #[unsafe(method_family = none)]
239 pub unsafe fn configurationWithTraitCollection(
240 trait_collection: Option<&UITraitCollection>,
241 ) -> Retained<Self>;
242
243 #[unsafe(method(configurationWithLocale:))]
244 #[unsafe(method_family = none)]
245 pub unsafe fn configurationWithLocale(locale: Option<&NSLocale>) -> Retained<Self>;
246 );
247}