objc2_ui_kit/generated/
UITextFormattingViewControllerComponent.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9pub type UITextFormattingViewControllerComponentKey = NSString;
14
15extern "C" {
16 pub static UITextFormattingViewControllerFormattingStylesComponentKey:
18 &'static UITextFormattingViewControllerComponentKey;
19}
20
21extern "C" {
22 pub static UITextFormattingViewControllerFontAttributesComponentKey:
24 &'static UITextFormattingViewControllerComponentKey;
25}
26
27extern "C" {
28 pub static UITextFormattingViewControllerFontPickerComponentKey:
30 &'static UITextFormattingViewControllerComponentKey;
31}
32
33extern "C" {
34 pub static UITextFormattingViewControllerFontSizeComponentKey:
36 &'static UITextFormattingViewControllerComponentKey;
37}
38
39extern "C" {
40 pub static UITextFormattingViewControllerFontPointSizeComponentKey:
42 &'static UITextFormattingViewControllerComponentKey;
43}
44
45extern "C" {
46 pub static UITextFormattingViewControllerTextAlignmentComponentKey:
48 &'static UITextFormattingViewControllerComponentKey;
49}
50
51extern "C" {
52 pub static UITextFormattingViewControllerTextAlignmentAndJustificationComponentKey:
54 &'static UITextFormattingViewControllerComponentKey;
55}
56
57extern "C" {
58 pub static UITextFormattingViewControllerTextIndentationComponentKey:
60 &'static UITextFormattingViewControllerComponentKey;
61}
62
63extern "C" {
64 pub static UITextFormattingViewControllerLineHeightComponentKey:
66 &'static UITextFormattingViewControllerComponentKey;
67}
68
69extern "C" {
70 pub static UITextFormattingViewControllerListStylesComponentKey:
72 &'static UITextFormattingViewControllerComponentKey;
73}
74
75extern "C" {
76 pub static UITextFormattingViewControllerTextColorComponentKey:
78 &'static UITextFormattingViewControllerComponentKey;
79}
80
81extern "C" {
82 pub static UITextFormattingViewControllerHighlightComponentKey:
84 &'static UITextFormattingViewControllerComponentKey;
85}
86
87extern "C" {
88 pub static UITextFormattingViewControllerHighlightPickerComponentKey:
90 &'static UITextFormattingViewControllerComponentKey;
91}
92
93#[repr(transparent)]
98#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
99pub struct UITextFormattingViewControllerComponentSize(pub NSInteger);
100impl UITextFormattingViewControllerComponentSize {
101 #[doc(alias = "UITextFormattingViewControllerComponentSizeAutomatic")]
102 pub const Automatic: Self = Self(0);
103 #[doc(alias = "UITextFormattingViewControllerComponentSizeMini")]
104 pub const Mini: Self = Self(1);
105 #[doc(alias = "UITextFormattingViewControllerComponentSizeSmall")]
106 pub const Small: Self = Self(2);
107 #[doc(alias = "UITextFormattingViewControllerComponentSizeRegular")]
108 pub const Regular: Self = Self(3);
109 #[doc(alias = "UITextFormattingViewControllerComponentSizeLarge")]
110 pub const Large: Self = Self(4);
111 #[doc(alias = "UITextFormattingViewControllerComponentSizeExtraLarge")]
112 pub const ExtraLarge: Self = Self(5);
113}
114
115unsafe impl Encode for UITextFormattingViewControllerComponentSize {
116 const ENCODING: Encoding = NSInteger::ENCODING;
117}
118
119unsafe impl RefEncode for UITextFormattingViewControllerComponentSize {
120 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
121}
122
123extern_class!(
124 #[unsafe(super(NSObject))]
128 #[derive(Debug, PartialEq, Eq, Hash)]
129 pub struct UITextFormattingViewControllerComponent;
130);
131
132extern_conformance!(
133 unsafe impl NSCoding for UITextFormattingViewControllerComponent {}
134);
135
136extern_conformance!(
137 unsafe impl NSCopying for UITextFormattingViewControllerComponent {}
138);
139
140unsafe impl CopyingHelper for UITextFormattingViewControllerComponent {
141 type Result = Self;
142}
143
144extern_conformance!(
145 unsafe impl NSObjectProtocol for UITextFormattingViewControllerComponent {}
146);
147
148extern_conformance!(
149 unsafe impl NSSecureCoding for UITextFormattingViewControllerComponent {}
150);
151
152impl UITextFormattingViewControllerComponent {
153 extern_methods!(
154 #[unsafe(method(componentKey))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn componentKey(&self) -> Retained<UITextFormattingViewControllerComponentKey>;
158
159 #[unsafe(method(preferredSize))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn preferredSize(&self) -> UITextFormattingViewControllerComponentSize;
163
164 #[unsafe(method(initWithComponentKey:preferredSize:))]
170 #[unsafe(method_family = init)]
171 pub unsafe fn initWithComponentKey_preferredSize(
172 this: Allocated<Self>,
173 component_key: &UITextFormattingViewControllerComponentKey,
174 preferred_size: UITextFormattingViewControllerComponentSize,
175 ) -> Retained<Self>;
176
177 #[unsafe(method(init))]
178 #[unsafe(method_family = init)]
179 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
180
181 #[unsafe(method(new))]
182 #[unsafe(method_family = new)]
183 pub unsafe fn new() -> Retained<Self>;
184 );
185}
186
187extern_class!(
188 #[unsafe(super(NSObject))]
192 #[derive(Debug, PartialEq, Eq, Hash)]
193 pub struct UITextFormattingViewControllerComponentGroup;
194);
195
196extern_conformance!(
197 unsafe impl NSCoding for UITextFormattingViewControllerComponentGroup {}
198);
199
200extern_conformance!(
201 unsafe impl NSCopying for UITextFormattingViewControllerComponentGroup {}
202);
203
204unsafe impl CopyingHelper for UITextFormattingViewControllerComponentGroup {
205 type Result = Self;
206}
207
208extern_conformance!(
209 unsafe impl NSObjectProtocol for UITextFormattingViewControllerComponentGroup {}
210);
211
212extern_conformance!(
213 unsafe impl NSSecureCoding for UITextFormattingViewControllerComponentGroup {}
214);
215
216impl UITextFormattingViewControllerComponentGroup {
217 extern_methods!(
218 #[unsafe(method(components))]
220 #[unsafe(method_family = none)]
221 pub unsafe fn components(
222 &self,
223 ) -> Retained<NSArray<UITextFormattingViewControllerComponent>>;
224
225 #[unsafe(method(initWithComponents:))]
228 #[unsafe(method_family = init)]
229 pub unsafe fn initWithComponents(
230 this: Allocated<Self>,
231 components: &NSArray<UITextFormattingViewControllerComponent>,
232 ) -> Retained<Self>;
233
234 #[unsafe(method(init))]
235 #[unsafe(method_family = init)]
236 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
237
238 #[unsafe(method(new))]
239 #[unsafe(method_family = new)]
240 pub unsafe fn new() -> Retained<Self>;
241 );
242}