objc2_tv_ml_kit/generated/
TVViewElementStyle.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8#[cfg(feature = "objc2-ui-kit")]
9use objc2_ui_kit::*;
10
11use crate::*;
12
13#[deprecated = "Please use SwiftUI or UIKit"]
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct TVElementAlignment(pub NSInteger);
19impl TVElementAlignment {
20 #[doc(alias = "TVElementAlignmentUndefined")]
21 #[deprecated = "Please use SwiftUI or UIKit"]
22 pub const Undefined: Self = Self(0);
23 #[doc(alias = "TVElementAlignmentLeft")]
24 #[deprecated = "Please use SwiftUI or UIKit"]
25 pub const Left: Self = Self(1);
26 #[doc(alias = "TVElementAlignmentCenter")]
27 #[deprecated = "Please use SwiftUI or UIKit"]
28 pub const Center: Self = Self(2);
29 #[doc(alias = "TVElementAlignmentRight")]
30 #[deprecated = "Please use SwiftUI or UIKit"]
31 pub const Right: Self = Self(3);
32 #[doc(alias = "TVElementAlignmentLeading")]
33 #[deprecated = "Please use SwiftUI or UIKit"]
34 pub const Leading: Self = Self(4);
35 #[doc(alias = "TVElementAlignmentTrailing")]
36 #[deprecated = "Please use SwiftUI or UIKit"]
37 pub const Trailing: Self = Self(5);
38}
39
40unsafe impl Encode for TVElementAlignment {
41 const ENCODING: Encoding = NSInteger::ENCODING;
42}
43
44unsafe impl RefEncode for TVElementAlignment {
45 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
46}
47
48#[deprecated = "Please use SwiftUI or UIKit"]
51#[repr(transparent)]
52#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
53pub struct TVElementContentAlignment(pub NSInteger);
54impl TVElementContentAlignment {
55 #[doc(alias = "TVElementContentAlignmentUndefined")]
56 #[deprecated = "Please use SwiftUI or UIKit"]
57 pub const Undefined: Self = Self(0);
58 #[doc(alias = "TVElementContentAlignmentTop")]
59 #[deprecated = "Please use SwiftUI or UIKit"]
60 pub const Top: Self = Self(1);
61 #[doc(alias = "TVElementContentAlignmentCenter")]
62 #[deprecated = "Please use SwiftUI or UIKit"]
63 pub const Center: Self = Self(2);
64 #[doc(alias = "TVElementContentAlignmentBottom")]
65 #[deprecated = "Please use SwiftUI or UIKit"]
66 pub const Bottom: Self = Self(3);
67}
68
69unsafe impl Encode for TVElementContentAlignment {
70 const ENCODING: Encoding = NSInteger::ENCODING;
71}
72
73unsafe impl RefEncode for TVElementContentAlignment {
74 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
75}
76
77#[deprecated = "Please use SwiftUI or UIKit"]
80#[repr(transparent)]
81#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
82pub struct TVElementPosition(pub NSInteger);
83impl TVElementPosition {
84 #[doc(alias = "TVElementPositionUndefined")]
85 #[deprecated = "Please use SwiftUI or UIKit"]
86 pub const Undefined: Self = Self(0);
87 #[doc(alias = "TVElementPositionCenter")]
88 #[deprecated = "Please use SwiftUI or UIKit"]
89 pub const Center: Self = Self(1);
90 #[doc(alias = "TVElementPositionTop")]
91 #[deprecated = "Please use SwiftUI or UIKit"]
92 pub const Top: Self = Self(2);
93 #[doc(alias = "TVElementPositionBottom")]
94 #[deprecated = "Please use SwiftUI or UIKit"]
95 pub const Bottom: Self = Self(3);
96 #[doc(alias = "TVElementPositionLeft")]
97 #[deprecated = "Please use SwiftUI or UIKit"]
98 pub const Left: Self = Self(4);
99 #[doc(alias = "TVElementPositionRight")]
100 #[deprecated = "Please use SwiftUI or UIKit"]
101 pub const Right: Self = Self(5);
102 #[doc(alias = "TVElementPositionTopLeft")]
103 #[deprecated = "Please use SwiftUI or UIKit"]
104 pub const TopLeft: Self = Self(6);
105 #[doc(alias = "TVElementPositionTopRight")]
106 #[deprecated = "Please use SwiftUI or UIKit"]
107 pub const TopRight: Self = Self(7);
108 #[doc(alias = "TVElementPositionBottomLeft")]
109 #[deprecated = "Please use SwiftUI or UIKit"]
110 pub const BottomLeft: Self = Self(8);
111 #[doc(alias = "TVElementPositionBottomRight")]
112 #[deprecated = "Please use SwiftUI or UIKit"]
113 pub const BottomRight: Self = Self(9);
114 #[doc(alias = "TVElementPositionHeader")]
115 #[deprecated = "Please use SwiftUI or UIKit"]
116 pub const Header: Self = Self(10);
117 #[doc(alias = "TVElementPositionFooter")]
118 #[deprecated = "Please use SwiftUI or UIKit"]
119 pub const Footer: Self = Self(11);
120 #[doc(alias = "TVElementPositionLeading")]
121 #[deprecated = "Please use SwiftUI or UIKit"]
122 pub const Leading: Self = Self(12);
123 #[doc(alias = "TVElementPositionTrailing")]
124 #[deprecated = "Please use SwiftUI or UIKit"]
125 pub const Trailing: Self = Self(13);
126 #[doc(alias = "TVElementPositionTopLeading")]
127 #[deprecated = "Please use SwiftUI or UIKit"]
128 pub const TopLeading: Self = Self(14);
129 #[doc(alias = "TVElementPositionTopTrailing")]
130 #[deprecated = "Please use SwiftUI or UIKit"]
131 pub const TopTrailing: Self = Self(15);
132 #[doc(alias = "TVElementPositionBottomLeading")]
133 #[deprecated = "Please use SwiftUI or UIKit"]
134 pub const BottomLeading: Self = Self(16);
135 #[doc(alias = "TVElementPositionBottomTrailing")]
136 #[deprecated = "Please use SwiftUI or UIKit"]
137 pub const BottomTrailing: Self = Self(17);
138}
139
140unsafe impl Encode for TVElementPosition {
141 const ENCODING: Encoding = NSInteger::ENCODING;
142}
143
144unsafe impl RefEncode for TVElementPosition {
145 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
146}
147
148extern_class!(
149 #[unsafe(super(NSObject))]
153 #[derive(Debug, PartialEq, Eq, Hash)]
154 #[deprecated = "Please use SwiftUI or UIKit"]
155 pub struct TVViewElementStyle;
156);
157
158extern_conformance!(
159 unsafe impl NSCopying for TVViewElementStyle {}
160);
161
162unsafe impl CopyingHelper for TVViewElementStyle {
163 type Result = Self;
164}
165
166extern_conformance!(
167 unsafe impl NSObjectProtocol for TVViewElementStyle {}
168);
169
170impl TVViewElementStyle {
171 extern_methods!(
172 #[deprecated = "Please use SwiftUI or UIKit"]
173 #[unsafe(method(valueForStyleProperty:))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn valueForStyleProperty(&self, name: &NSString) -> Option<Retained<AnyObject>>;
176
177 #[cfg(feature = "TVColor")]
178 #[deprecated = "Please use SwiftUI or UIKit"]
179 #[unsafe(method(backgroundColor))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn backgroundColor(&self) -> Option<Retained<TVColor>>;
182
183 #[cfg(feature = "TVColor")]
184 #[deprecated = "Please use SwiftUI or UIKit"]
185 #[unsafe(method(color))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn color(&self) -> Option<Retained<TVColor>>;
188
189 #[cfg(feature = "objc2-core-foundation")]
190 #[deprecated = "Please use SwiftUI or UIKit"]
191 #[unsafe(method(fontSize))]
192 #[unsafe(method_family = none)]
193 pub unsafe fn fontSize(&self) -> CGFloat;
194
195 #[deprecated = "Please use SwiftUI or UIKit"]
196 #[unsafe(method(fontWeight))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn fontWeight(&self) -> Option<Retained<NSString>>;
199
200 #[cfg(feature = "objc2-core-foundation")]
201 #[deprecated = "Please use SwiftUI or UIKit"]
202 #[unsafe(method(height))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn height(&self) -> CGFloat;
205
206 #[cfg(feature = "objc2-ui-kit")]
207 #[deprecated = "Please use SwiftUI or UIKit"]
208 #[unsafe(method(margin))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn margin(&self) -> UIEdgeInsets;
211
212 #[cfg(feature = "objc2-ui-kit")]
213 #[deprecated = "Please use SwiftUI or UIKit"]
214 #[unsafe(method(focusMargin))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn focusMargin(&self) -> UIEdgeInsets;
217
218 #[cfg(feature = "objc2-core-foundation")]
219 #[deprecated = "Please use SwiftUI or UIKit"]
220 #[unsafe(method(maxHeight))]
221 #[unsafe(method_family = none)]
222 pub unsafe fn maxHeight(&self) -> CGFloat;
223
224 #[cfg(feature = "objc2-core-foundation")]
225 #[deprecated = "Please use SwiftUI or UIKit"]
226 #[unsafe(method(maxWidth))]
227 #[unsafe(method_family = none)]
228 pub unsafe fn maxWidth(&self) -> CGFloat;
229
230 #[cfg(feature = "objc2-core-foundation")]
231 #[deprecated = "Please use SwiftUI or UIKit"]
232 #[unsafe(method(minHeight))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn minHeight(&self) -> CGFloat;
235
236 #[cfg(feature = "objc2-core-foundation")]
237 #[deprecated = "Please use SwiftUI or UIKit"]
238 #[unsafe(method(minWidth))]
239 #[unsafe(method_family = none)]
240 pub unsafe fn minWidth(&self) -> CGFloat;
241
242 #[cfg(feature = "objc2-ui-kit")]
243 #[deprecated = "Please use SwiftUI or UIKit"]
244 #[unsafe(method(padding))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn padding(&self) -> UIEdgeInsets;
247
248 #[cfg(feature = "objc2-ui-kit")]
249 #[deprecated = "Please use SwiftUI or UIKit"]
250 #[unsafe(method(textAlignment))]
251 #[unsafe(method_family = none)]
252 pub unsafe fn textAlignment(&self) -> NSTextAlignment;
253
254 #[cfg(feature = "objc2-core-foundation")]
255 #[deprecated = "Please use SwiftUI or UIKit"]
256 #[unsafe(method(width))]
257 #[unsafe(method_family = none)]
258 pub unsafe fn width(&self) -> CGFloat;
259
260 #[deprecated = "Please use SwiftUI or UIKit"]
261 #[unsafe(method(alignment))]
262 #[unsafe(method_family = none)]
263 pub unsafe fn alignment(&self) -> TVElementAlignment;
264
265 #[deprecated = "Please use SwiftUI or UIKit"]
266 #[unsafe(method(contentAlignment))]
267 #[unsafe(method_family = none)]
268 pub unsafe fn contentAlignment(&self) -> TVElementContentAlignment;
269
270 #[cfg(feature = "TVColor")]
271 #[deprecated = "Please use SwiftUI or UIKit"]
272 #[unsafe(method(highlightColor))]
273 #[unsafe(method_family = none)]
274 pub unsafe fn highlightColor(&self) -> Option<Retained<TVColor>>;
275
276 #[deprecated = "Please use SwiftUI or UIKit"]
277 #[unsafe(method(imageTreatmentName))]
278 #[unsafe(method_family = none)]
279 pub unsafe fn imageTreatmentName(&self) -> Option<Retained<NSString>>;
280
281 #[cfg(feature = "objc2-core-foundation")]
282 #[deprecated = "Please use SwiftUI or UIKit"]
283 #[unsafe(method(interitemSpacing))]
284 #[unsafe(method_family = none)]
285 pub unsafe fn interitemSpacing(&self) -> CGFloat;
286
287 #[deprecated = "Please use SwiftUI or UIKit"]
288 #[unsafe(method(textHighlightStyle))]
289 #[unsafe(method_family = none)]
290 pub unsafe fn textHighlightStyle(&self) -> Option<Retained<NSString>>;
291
292 #[cfg(feature = "objc2-core-foundation")]
293 #[deprecated = "Please use SwiftUI or UIKit"]
294 #[unsafe(method(textMinimumScaleFactor))]
295 #[unsafe(method_family = none)]
296 pub unsafe fn textMinimumScaleFactor(&self) -> CGFloat;
297
298 #[deprecated = "Please use SwiftUI or UIKit"]
299 #[unsafe(method(position))]
300 #[unsafe(method_family = none)]
301 pub unsafe fn position(&self) -> TVElementPosition;
302
303 #[deprecated = "Please use SwiftUI or UIKit"]
304 #[unsafe(method(ratingStyle))]
305 #[unsafe(method_family = none)]
306 pub unsafe fn ratingStyle(&self) -> Option<Retained<NSString>>;
307
308 #[deprecated = "Please use SwiftUI or UIKit"]
309 #[unsafe(method(maxTextLines))]
310 #[unsafe(method_family = none)]
311 pub unsafe fn maxTextLines(&self) -> NSUInteger;
312
313 #[deprecated = "Please use SwiftUI or UIKit"]
314 #[unsafe(method(textStyle))]
315 #[unsafe(method_family = none)]
316 pub unsafe fn textStyle(&self) -> Option<Retained<NSString>>;
317
318 #[cfg(feature = "TVColor")]
319 #[deprecated = "Please use SwiftUI or UIKit"]
320 #[unsafe(method(tintColor))]
321 #[unsafe(method_family = none)]
322 pub unsafe fn tintColor(&self) -> Option<Retained<TVColor>>;
323 );
324}
325
326impl TVViewElementStyle {
328 extern_methods!(
329 #[unsafe(method(init))]
330 #[unsafe(method_family = init)]
331 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
332
333 #[unsafe(method(new))]
334 #[unsafe(method_family = new)]
335 pub unsafe fn new() -> Retained<Self>;
336 );
337}