objc2_ui_kit/generated/
UITextFormattingViewControllerConfiguration.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct UITextFormattingViewControllerConfiguration;
17);
18
19extern_conformance!(
20 unsafe impl NSCoding for UITextFormattingViewControllerConfiguration {}
21);
22
23extern_conformance!(
24 unsafe impl NSCopying for UITextFormattingViewControllerConfiguration {}
25);
26
27unsafe impl CopyingHelper for UITextFormattingViewControllerConfiguration {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSObjectProtocol for UITextFormattingViewControllerConfiguration {}
33);
34
35extern_conformance!(
36 unsafe impl NSSecureCoding for UITextFormattingViewControllerConfiguration {}
37);
38
39impl UITextFormattingViewControllerConfiguration {
40 extern_methods!(
41 #[cfg(feature = "UITextFormattingViewControllerComponent")]
42 #[unsafe(method(groups))]
44 #[unsafe(method_family = none)]
45 pub fn groups(&self) -> Retained<NSArray<UITextFormattingViewControllerComponentGroup>>;
46
47 #[cfg(feature = "UITextFormattingViewControllerFormattingStyle")]
48 #[unsafe(method(formattingStyles))]
50 #[unsafe(method_family = none)]
51 pub fn formattingStyles(
52 &self,
53 ) -> Option<Retained<NSArray<UITextFormattingViewControllerFormattingStyle>>>;
54
55 #[cfg(feature = "UITextFormattingViewControllerFormattingStyle")]
56 #[unsafe(method(setFormattingStyles:))]
60 #[unsafe(method_family = none)]
61 pub fn setFormattingStyles(
62 &self,
63 formatting_styles: Option<&NSArray<UITextFormattingViewControllerFormattingStyle>>,
64 );
65
66 #[cfg(feature = "UIFontPickerViewControllerConfiguration")]
67 #[unsafe(method(fontPickerConfiguration))]
69 #[unsafe(method_family = none)]
70 pub fn fontPickerConfiguration(
71 &self,
72 mtm: MainThreadMarker,
73 ) -> Option<Retained<UIFontPickerViewControllerConfiguration>>;
74
75 #[cfg(feature = "UIFontPickerViewControllerConfiguration")]
76 #[unsafe(method(setFontPickerConfiguration:))]
80 #[unsafe(method_family = none)]
81 pub fn setFontPickerConfiguration(
82 &self,
83 font_picker_configuration: Option<&UIFontPickerViewControllerConfiguration>,
84 );
85
86 #[unsafe(method(init))]
88 #[unsafe(method_family = init)]
89 pub fn init(this: Allocated<Self>) -> Retained<Self>;
90
91 #[cfg(feature = "UITextFormattingViewControllerComponent")]
92 #[unsafe(method(initWithGroups:))]
95 #[unsafe(method_family = init)]
96 pub fn initWithGroups(
97 this: Allocated<Self>,
98 groups: &NSArray<UITextFormattingViewControllerComponentGroup>,
99 ) -> Retained<Self>;
100 );
101}
102
103impl UITextFormattingViewControllerConfiguration {
105 extern_methods!(
106 #[unsafe(method(new))]
107 #[unsafe(method_family = new)]
108 pub fn new() -> Retained<Self>;
109 );
110}
111
112impl DefaultRetained for UITextFormattingViewControllerConfiguration {
113 #[inline]
114 fn default_retained() -> Retained<Self> {
115 Self::new()
116 }
117}