objc2_ui_kit/generated/
UITextFormattingViewControllerChangeValue.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// Enumeration of text formatting actions.
10///
11/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerchangetype?language=objc)
12// NS_TYPED_ENUM
13pub type UITextFormattingViewControllerChangeType = NSString;
14
15extern "C" {
16    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerundefinedchangetype?language=objc)
17    pub static UITextFormattingViewControllerUndefinedChangeType:
18        &'static UITextFormattingViewControllerChangeType;
19}
20
21extern "C" {
22    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetboldchangetype?language=objc)
23    pub static UITextFormattingViewControllerSetBoldChangeType:
24        &'static UITextFormattingViewControllerChangeType;
25}
26
27extern "C" {
28    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveboldchangetype?language=objc)
29    pub static UITextFormattingViewControllerRemoveBoldChangeType:
30        &'static UITextFormattingViewControllerChangeType;
31}
32
33extern "C" {
34    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetitalicchangetype?language=objc)
35    pub static UITextFormattingViewControllerSetItalicChangeType:
36        &'static UITextFormattingViewControllerChangeType;
37}
38
39extern "C" {
40    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveitalicchangetype?language=objc)
41    pub static UITextFormattingViewControllerRemoveItalicChangeType:
42        &'static UITextFormattingViewControllerChangeType;
43}
44
45extern "C" {
46    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetunderlinechangetype?language=objc)
47    pub static UITextFormattingViewControllerSetUnderlineChangeType:
48        &'static UITextFormattingViewControllerChangeType;
49}
50
51extern "C" {
52    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremoveunderlinechangetype?language=objc)
53    pub static UITextFormattingViewControllerRemoveUnderlineChangeType:
54        &'static UITextFormattingViewControllerChangeType;
55}
56
57extern "C" {
58    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollersetstrikethroughchangetype?language=objc)
59    pub static UITextFormattingViewControllerSetStrikethroughChangeType:
60        &'static UITextFormattingViewControllerChangeType;
61}
62
63extern "C" {
64    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerremovestrikethroughchangetype?language=objc)
65    pub static UITextFormattingViewControllerRemoveStrikethroughChangeType:
66        &'static UITextFormattingViewControllerChangeType;
67}
68
69extern "C" {
70    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerfontchangetype?language=objc)
71    pub static UITextFormattingViewControllerFontChangeType:
72        &'static UITextFormattingViewControllerChangeType;
73}
74
75extern "C" {
76    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerfontsizechangetype?language=objc)
77    pub static UITextFormattingViewControllerFontSizeChangeType:
78        &'static UITextFormattingViewControllerChangeType;
79}
80
81extern "C" {
82    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerincreasefontsizechangetype?language=objc)
83    pub static UITextFormattingViewControllerIncreaseFontSizeChangeType:
84        &'static UITextFormattingViewControllerChangeType;
85}
86
87extern "C" {
88    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerdecreasefontsizechangetype?language=objc)
89    pub static UITextFormattingViewControllerDecreaseFontSizeChangeType:
90        &'static UITextFormattingViewControllerChangeType;
91}
92
93extern "C" {
94    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextcolorchangetype?language=objc)
95    pub static UITextFormattingViewControllerTextColorChangeType:
96        &'static UITextFormattingViewControllerChangeType;
97}
98
99extern "C" {
100    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerlineheightpointsizechangetype?language=objc)
101    pub static UITextFormattingViewControllerLineHeightPointSizeChangeType:
102        &'static UITextFormattingViewControllerChangeType;
103}
104
105extern "C" {
106    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerincreaseindentationchangetype?language=objc)
107    pub static UITextFormattingViewControllerIncreaseIndentationChangeType:
108        &'static UITextFormattingViewControllerChangeType;
109}
110
111extern "C" {
112    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerdecreaseindentationchangetype?language=objc)
113    pub static UITextFormattingViewControllerDecreaseIndentationChangeType:
114        &'static UITextFormattingViewControllerChangeType;
115}
116
117extern "C" {
118    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerformattingstylechangetype?language=objc)
119    pub static UITextFormattingViewControllerFormattingStyleChangeType:
120        &'static UITextFormattingViewControllerChangeType;
121}
122
123extern "C" {
124    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextlistchangetype?language=objc)
125    pub static UITextFormattingViewControllerTextListChangeType:
126        &'static UITextFormattingViewControllerChangeType;
127}
128
129extern "C" {
130    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollertextalignmentchangetype?language=objc)
131    pub static UITextFormattingViewControllerTextAlignmentChangeType:
132        &'static UITextFormattingViewControllerChangeType;
133}
134
135extern "C" {
136    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerhighlightchangetype?language=objc)
137    pub static UITextFormattingViewControllerHighlightChangeType:
138        &'static UITextFormattingViewControllerChangeType;
139}
140
141extern_class!(
142    /// Describes text formatting change that is a result of user action.
143    /// Contains type of change, any associated value that may be applicable to that change.
144    ///
145    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerchangevalue?language=objc)
146    #[unsafe(super(NSObject))]
147    #[derive(Debug, PartialEq, Eq, Hash)]
148    pub struct UITextFormattingViewControllerChangeValue;
149);
150
151extern_conformance!(
152    unsafe impl NSCoding for UITextFormattingViewControllerChangeValue {}
153);
154
155extern_conformance!(
156    unsafe impl NSCopying for UITextFormattingViewControllerChangeValue {}
157);
158
159unsafe impl CopyingHelper for UITextFormattingViewControllerChangeValue {
160    type Result = Self;
161}
162
163extern_conformance!(
164    unsafe impl NSObjectProtocol for UITextFormattingViewControllerChangeValue {}
165);
166
167extern_conformance!(
168    unsafe impl NSSecureCoding for UITextFormattingViewControllerChangeValue {}
169);
170
171impl UITextFormattingViewControllerChangeValue {
172    extern_methods!(
173        /// Type of change.
174        #[unsafe(method(changeType))]
175        #[unsafe(method_family = none)]
176        pub unsafe fn changeType(&self) -> Retained<UITextFormattingViewControllerChangeType>;
177
178        /// On formatting style change, use this property to determine selected style.
179        #[unsafe(method(formattingStyleKey))]
180        #[unsafe(method_family = none)]
181        pub unsafe fn formattingStyleKey(&self) -> Option<Retained<NSString>>;
182
183        #[cfg(feature = "UIFont")]
184        /// Any font that may be associated with the change.
185        /// For example, this property will be available in case of font typography settings change or new font selection.
186        #[unsafe(method(font))]
187        #[unsafe(method_family = none)]
188        pub unsafe fn font(&self) -> Option<Retained<UIFont>>;
189
190        #[cfg(feature = "UIColor")]
191        /// Any color value that may be associated with the change.
192        /// For example, this property will be available if user has changed text color.
193        #[unsafe(method(color))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn color(&self) -> Option<Retained<UIColor>>;
196
197        /// Any number value that may be associated with the change.
198        /// For example, if case of font point size change, this property will reflect new point size.
199        #[unsafe(method(numberValue))]
200        #[unsafe(method_family = none)]
201        pub unsafe fn numberValue(&self) -> Option<Retained<NSNumber>>;
202
203        #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
204        /// Text list style associated with the `UITextFormattingViewControllerTextListChangeType`.
205        /// If property is nil for `UITextFormattingViewControllerTextListChangeType`, it indicates text list has been removed.
206        #[unsafe(method(textList))]
207        #[unsafe(method_family = none)]
208        pub unsafe fn textList(&self) -> Option<Retained<UITextFormattingViewControllerTextList>>;
209
210        #[cfg(feature = "NSText")]
211        /// Text alignment associated with the `UITextFormattingViewControllerTextAlignmentChangeType`.
212        #[unsafe(method(textAlignment))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn textAlignment(&self) -> NSTextAlignment;
215
216        #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
217        /// Text highlight associated with the `UITextFormattingViewControllerHighlightChangeType`.
218        /// If property is nil for `UITextFormattingViewControllerHighlightChangeType`, it indicates highlight has been removed.
219        #[unsafe(method(highlight))]
220        #[unsafe(method_family = none)]
221        pub unsafe fn highlight(&self)
222            -> Option<Retained<UITextFormattingViewControllerHighlight>>;
223
224        #[unsafe(method(init))]
225        #[unsafe(method_family = init)]
226        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
227
228        #[unsafe(method(new))]
229        #[unsafe(method_family = new)]
230        pub unsafe fn new() -> Retained<Self>;
231    );
232}