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
151unsafe impl NSCoding for UITextFormattingViewControllerChangeValue {}
152
153unsafe impl NSCopying for UITextFormattingViewControllerChangeValue {}
154
155unsafe impl CopyingHelper for UITextFormattingViewControllerChangeValue {
156    type Result = Self;
157}
158
159unsafe impl NSObjectProtocol for UITextFormattingViewControllerChangeValue {}
160
161unsafe impl NSSecureCoding for UITextFormattingViewControllerChangeValue {}
162
163impl UITextFormattingViewControllerChangeValue {
164    extern_methods!(
165        /// Type of change.
166        #[unsafe(method(changeType))]
167        #[unsafe(method_family = none)]
168        pub unsafe fn changeType(&self) -> Retained<UITextFormattingViewControllerChangeType>;
169
170        /// On formatting style change, use this property to determine selected style.
171        #[unsafe(method(formattingStyleKey))]
172        #[unsafe(method_family = none)]
173        pub unsafe fn formattingStyleKey(&self) -> Option<Retained<NSString>>;
174
175        #[cfg(feature = "UIFont")]
176        /// Any font that may be associated with the change.
177        /// For example, this property will be available in case of font typography settings change or new font selection.
178        #[unsafe(method(font))]
179        #[unsafe(method_family = none)]
180        pub unsafe fn font(&self) -> Option<Retained<UIFont>>;
181
182        #[cfg(feature = "UIColor")]
183        /// Any color value that may be associated with the change.
184        /// For example, this property will be available if user has changed text color.
185        #[unsafe(method(color))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn color(&self) -> Option<Retained<UIColor>>;
188
189        /// Any number value that may be associated with the change.
190        /// For example, if case of font point size change, this property will reflect new point size.
191        #[unsafe(method(numberValue))]
192        #[unsafe(method_family = none)]
193        pub unsafe fn numberValue(&self) -> Option<Retained<NSNumber>>;
194
195        #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
196        /// Text list style associated with the `UITextFormattingViewControllerTextListChangeType`.
197        /// If property is nil for `UITextFormattingViewControllerTextListChangeType`, it indicates text list has been removed.
198        #[unsafe(method(textList))]
199        #[unsafe(method_family = none)]
200        pub unsafe fn textList(&self) -> Option<Retained<UITextFormattingViewControllerTextList>>;
201
202        #[cfg(feature = "NSText")]
203        /// Text alignment associated with the `UITextFormattingViewControllerTextAlignmentChangeType`.
204        #[unsafe(method(textAlignment))]
205        #[unsafe(method_family = none)]
206        pub unsafe fn textAlignment(&self) -> NSTextAlignment;
207
208        #[cfg(feature = "UITextFormattingViewControllerFormattingDescriptor")]
209        /// Text highlight associated with the `UITextFormattingViewControllerHighlightChangeType`.
210        /// If property is nil for `UITextFormattingViewControllerHighlightChangeType`, it indicates highlight has been removed.
211        #[unsafe(method(highlight))]
212        #[unsafe(method_family = none)]
213        pub unsafe fn highlight(&self)
214            -> Option<Retained<UITextFormattingViewControllerHighlight>>;
215
216        #[unsafe(method(init))]
217        #[unsafe(method_family = init)]
218        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
219
220        #[unsafe(method(new))]
221        #[unsafe(method_family = new)]
222        pub unsafe fn new() -> Retained<Self>;
223    );
224}