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
132unsafe impl NSCoding for UITextFormattingViewControllerComponent {}
133
134unsafe impl NSCopying for UITextFormattingViewControllerComponent {}
135
136unsafe impl CopyingHelper for UITextFormattingViewControllerComponent {
137 type Result = Self;
138}
139
140unsafe impl NSObjectProtocol for UITextFormattingViewControllerComponent {}
141
142unsafe impl NSSecureCoding for UITextFormattingViewControllerComponent {}
143
144impl UITextFormattingViewControllerComponent {
145 extern_methods!(
146 #[unsafe(method(componentKey))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn componentKey(&self) -> Retained<UITextFormattingViewControllerComponentKey>;
150
151 #[unsafe(method(preferredSize))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn preferredSize(&self) -> UITextFormattingViewControllerComponentSize;
155
156 #[unsafe(method(initWithComponentKey:preferredSize:))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn initWithComponentKey_preferredSize(
164 this: Allocated<Self>,
165 component_key: &UITextFormattingViewControllerComponentKey,
166 preferred_size: UITextFormattingViewControllerComponentSize,
167 ) -> Retained<Self>;
168
169 #[unsafe(method(init))]
170 #[unsafe(method_family = init)]
171 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
172
173 #[unsafe(method(new))]
174 #[unsafe(method_family = new)]
175 pub unsafe fn new() -> Retained<Self>;
176 );
177}
178
179extern_class!(
180 #[unsafe(super(NSObject))]
184 #[derive(Debug, PartialEq, Eq, Hash)]
185 pub struct UITextFormattingViewControllerComponentGroup;
186);
187
188unsafe impl NSCoding for UITextFormattingViewControllerComponentGroup {}
189
190unsafe impl NSCopying for UITextFormattingViewControllerComponentGroup {}
191
192unsafe impl CopyingHelper for UITextFormattingViewControllerComponentGroup {
193 type Result = Self;
194}
195
196unsafe impl NSObjectProtocol for UITextFormattingViewControllerComponentGroup {}
197
198unsafe impl NSSecureCoding for UITextFormattingViewControllerComponentGroup {}
199
200impl UITextFormattingViewControllerComponentGroup {
201 extern_methods!(
202 #[unsafe(method(components))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn components(
206 &self,
207 ) -> Retained<NSArray<UITextFormattingViewControllerComponent>>;
208
209 #[unsafe(method(initWithComponents:))]
212 #[unsafe(method_family = init)]
213 pub unsafe fn initWithComponents(
214 this: Allocated<Self>,
215 components: &NSArray<UITextFormattingViewControllerComponent>,
216 ) -> Retained<Self>;
217
218 #[unsafe(method(init))]
219 #[unsafe(method_family = init)]
220 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
221
222 #[unsafe(method(new))]
223 #[unsafe(method_family = new)]
224 pub unsafe fn new() -> Retained<Self>;
225 );
226}