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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
/// Enumeration of text formatting actions.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerchangetype?language=objc)
// NS_TYPED_ENUM
pub type UITextFormattingViewControllerChangeType = NSString;
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerundefinedchangetype?language=objc)
pub static UITextFormattingViewControllerUndefinedChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetboldchangetype?language=objc)
pub static UITextFormattingViewControllerSetBoldChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveboldchangetype?language=objc)
pub static UITextFormattingViewControllerRemoveBoldChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetitalicchangetype?language=objc)
pub static UITextFormattingViewControllerSetItalicChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveitalicchangetype?language=objc)
pub static UITextFormattingViewControllerRemoveItalicChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetunderlinechangetype?language=objc)
pub static UITextFormattingViewControllerSetUnderlineChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveunderlinechangetype?language=objc)
pub static UITextFormattingViewControllerRemoveUnderlineChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetstrikethroughchangetype?language=objc)
pub static UITextFormattingViewControllerSetStrikethroughChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremovestrikethroughchangetype?language=objc)
pub static UITextFormattingViewControllerRemoveStrikethroughChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerfontchangetype?language=objc)
pub static UITextFormattingViewControllerFontChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerfontsizechangetype?language=objc)
pub static UITextFormattingViewControllerFontSizeChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerincreasefontsizechangetype?language=objc)
pub static UITextFormattingViewControllerIncreaseFontSizeChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerdecreasefontsizechangetype?language=objc)
pub static UITextFormattingViewControllerDecreaseFontSizeChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextcolorchangetype?language=objc)
pub static UITextFormattingViewControllerTextColorChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerlineheightpointsizechangetype?language=objc)
pub static UITextFormattingViewControllerLineHeightPointSizeChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerincreaseindentationchangetype?language=objc)
pub static UITextFormattingViewControllerIncreaseIndentationChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerdecreaseindentationchangetype?language=objc)
pub static UITextFormattingViewControllerDecreaseIndentationChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerformattingstylechangetype?language=objc)
pub static UITextFormattingViewControllerFormattingStyleChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextlistchangetype?language=objc)
pub static UITextFormattingViewControllerTextListChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextalignmentchangetype?language=objc)
pub static UITextFormattingViewControllerTextAlignmentChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerhighlightchangetype?language=objc)
pub static UITextFormattingViewControllerHighlightChangeType:
&'static UITextFormattingViewControllerChangeType;
}
extern_class!(
/// Describes text formatting change that is a result of user action.
/// Contains type of change, any associated value that may be applicable to that change.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerchangevalue?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UITextFormattingViewControllerChangeValue;
);
extern_conformance!(
unsafe impl NSCoding for UITextFormattingViewControllerChangeValue {}
);
extern_conformance!(
unsafe impl NSCopying for UITextFormattingViewControllerChangeValue {}
);
unsafe impl CopyingHelper for UITextFormattingViewControllerChangeValue {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UITextFormattingViewControllerChangeValue {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UITextFormattingViewControllerChangeValue {}
);
impl UITextFormattingViewControllerChangeValue {
extern_methods!(
/// Type of change.
#[unsafe(method(changeType))]
#[unsafe(method_family = none)]
pub fn changeType(&self) -> Retained<UITextFormattingViewControllerChangeType>;
/// On formatting style change, use this property to determine selected style.
#[unsafe(method(formattingStyleKey))]
#[unsafe(method_family = none)]
pub fn formattingStyleKey(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "UIFont")]
/// Any font that may be associated with the change.
/// For example, this property will be available in case of font typography settings change or new font selection.
#[unsafe(method(font))]
#[unsafe(method_family = none)]
pub fn font(&self) -> Option<Retained<UIFont>>;
#[cfg(feature = "UIColor")]
/// Any color value that may be associated with the change.
/// For example, this property will be available if user has changed text color.
#[unsafe(method(color))]
#[unsafe(method_family = none)]
pub fn color(&self) -> Option<Retained<UIColor>>;
/// Any number value that may be associated with the change.
/// For example, if case of font point size change, this property will reflect new point size.
#[unsafe(method(numberValue))]
#[unsafe(method_family = none)]
pub fn numberValue(&self) -> Option<Retained<NSNumber>>;
#[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
/// Text list style associated with the `UITextFormattingViewControllerTextListChangeType`.
/// If property is nil for `UITextFormattingViewControllerTextListChangeType`, it indicates text list has been removed.
#[unsafe(method(textList))]
#[unsafe(method_family = none)]
pub fn textList(&self) -> Option<Retained<UITextFormattingViewControllerTextList>>;
#[cfg(feature = "NSText")]
/// Text alignment associated with the `UITextFormattingViewControllerTextAlignmentChangeType`.
#[unsafe(method(textAlignment))]
#[unsafe(method_family = none)]
pub fn textAlignment(&self) -> NSTextAlignment;
#[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
/// Text highlight associated with the `UITextFormattingViewControllerHighlightChangeType`.
/// If property is nil for `UITextFormattingViewControllerHighlightChangeType`, it indicates highlight has been removed.
#[unsafe(method(highlight))]
#[unsafe(method_family = none)]
pub fn highlight(&self) -> Option<Retained<UITextFormattingViewControllerHighlight>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}